Skip to content

Commit e14ec7a

Browse files
authored
Merge pull request #1077 from ricardozanini/issue-1076
Fix #1076 - Make detail and title a runtime expression in the schema
2 parents 48560fd + b0172b8 commit e14ec7a

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

dsl-reference.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,7 +1115,7 @@ Defines the configuration of a catch clause, which a concept used to catch error
11151115

11161116
| Name | Type | Required | Description |
11171117
|:--|:---:|:---:|:---|
1118-
| errors | [`errorFilter`](#retry) | `no` | The definition of the errors to catch. |
1118+
| errors | [`errorFilter`](#error) | `no` | The definition of the errors to catch. |
11191119
| as | `string` | `no` | The name of the runtime expression variable to save the error as. Defaults to 'error'. |
11201120
| when | `string`| `no` | A runtime expression used to determine whether or not to catch the filtered error. |
11211121
| exceptWhen | `string` | `no` | A runtime expression used to determine whether or not to catch the filtered error. |
@@ -1958,8 +1958,8 @@ Defines the [Problem Details RFC](https://datatracker.ietf.org/doc/html/rfc7807)
19581958
| type | [`uri-template`](#uri-template) | `yes` | A URI reference that identifies the [`error`](#error) type. <br><u>For cross-compatibility concerns, it is strongly recommended to use [Standard Error Types](#standard-error-types) whenever possible.<u><br><u>Runtimes **MUST** ensure that the property has been set when raising or escalating the [`error`](#error).<u> |
19591959
| status | `integer` | `yes` | The status code generated by the origin for this occurrence of the [`error`](#error).<br><u>For cross-compatibility concerns, it is strongly recommended to use [HTTP Status Codes](https://datatracker.ietf.org/doc/html/rfc7231#section-6) whenever possible.<u><br><u>Runtimes **MUST** ensure that the property has been set when raising or escalating the [`error`](#error).<u> |
19601960
| instance | `string` | `no` | A [JSON Pointer](https://datatracker.ietf.org/doc/html/rfc6901) used to reference the component the [`error`](#error) originates from.<br><u>Runtimes **MUST** set the property when raising or escalating the [`error`](#error). Otherwise ignore.<u> |
1961-
| title | `string` | `no` | A short, human-readable summary of the [`error`](#error). |
1962-
| detail | `string` | `no` | A human-readable explanation specific to this occurrence of the [`error`](#error). |
1961+
| title | `string` | `no` | A short, human-readable summary of the [`error`](#error) or a [runtime expression](dsl.md#runtime-expressions) |
1962+
| detail | `string` | `no` | A human-readable explanation specific to this occurrence of the [`error`](#error) or a [runtime expression](dsl.md#runtime-expressions) |
19631963

19641964
#### Examples
19651965

schema/workflow.yaml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,13 +1188,21 @@ $defs:
11881188
title: ExpressionErrorInstance
11891189
description: An expression based error instance.
11901190
title:
1191-
type: string
1192-
title: ErrorTitle
11931191
description: A short, human-readable summary of the error.
1192+
title: ErrorTitle
1193+
anyOf:
1194+
- $ref: '#/$defs/runtimeExpression'
1195+
title: ExpressionErrorTitle
1196+
- type: string
1197+
title: LiteralErrorTitle
11941198
detail:
1195-
type: string
11961199
title: ErrorDetails
11971200
description: A human-readable explanation specific to this occurrence of the error.
1201+
anyOf:
1202+
- $ref: '#/$defs/runtimeExpression'
1203+
title: ExpressionErrorDetails
1204+
- type: string
1205+
title: LiteralErrorDetails
11981206
required: [ type, status ]
11991207
errorFilter:
12001208
type: object

0 commit comments

Comments
 (0)