Skip to content

Fix #1076 - Make detail and title a runtime expression in the schema #1077

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions dsl-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1115,7 +1115,7 @@ Defines the configuration of a catch clause, which a concept used to catch error

| Name | Type | Required | Description |
|:--|:---:|:---:|:---|
| errors | [`errorFilter`](#retry) | `no` | The definition of the errors to catch. |
| errors | [`errorFilter`](#error) | `no` | The definition of the errors to catch. |
| as | `string` | `no` | The name of the runtime expression variable to save the error as. Defaults to 'error'. |
| when | `string`| `no` | A runtime expression used to determine whether or not to catch the filtered error. |
| exceptWhen | `string` | `no` | A runtime expression used to determine whether or not to catch the filtered error. |
Expand Down Expand Up @@ -1958,8 +1958,8 @@ Defines the [Problem Details RFC](https://datatracker.ietf.org/doc/html/rfc7807)
| 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> |
| 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> |
| 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> |
| title | `string` | `no` | A short, human-readable summary of the [`error`](#error). |
| detail | `string` | `no` | A human-readable explanation specific to this occurrence of the [`error`](#error). |
| title | `string` | `no` | A short, human-readable summary of the [`error`](#error) or a [runtime expression](dsl.md#runtime-expressions) |
| detail | `string` | `no` | A human-readable explanation specific to this occurrence of the [`error`](#error) or a [runtime expression](dsl.md#runtime-expressions) |

#### Examples

Expand Down
14 changes: 11 additions & 3 deletions schema/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1188,13 +1188,21 @@ $defs:
title: ExpressionErrorInstance
description: An expression based error instance.
title:
type: string
title: ErrorTitle
description: A short, human-readable summary of the error.
title: ErrorTitle
anyOf:
- $ref: '#/$defs/runtimeExpression'
title: ExpressionErrorTitle
- type: string
title: LiteralErrorTitle
detail:
type: string
title: ErrorDetails
description: A human-readable explanation specific to this occurrence of the error.
anyOf:
- $ref: '#/$defs/runtimeExpression'
title: ExpressionErrorDetails
- type: string
title: LiteralErrorDetails
required: [ type, status ]
errorFilter:
type: object
Expand Down