Skip to content

Error title and detail in workflow.yaml schema should be a Runtime Expression and not a String #1076

Closed
@ricardozanini

Description

@ricardozanini

I tried this:

The current title and detail in the Error definition are strings. Still, they should be runtime expressions so users can manipulate the error structure when raising an error, for example.

This happened:

The schema is not enforcing what we have in examples:

document:
  dsl: '1.0.0-alpha5'
  namespace: test
  name: raise-not-implemented
  version: '0.1.0'
do: 
  - notImplemented:
      raise:
        error:
          type: https://serverlessworkflow.io/errors/not-implemented
          status: 500
          title: Not Implemented
          detail: ${ "The workflow '\( $workflow.definition.document.name ):\( $workflow.definition.document.version )' is a work in progress and cannot be run yet" }

https://github.com/serverlessworkflow/specification/blob/v1.0.0/examples/raise-inline.yaml

I expected this:

No response

Is there a workaround?

No response

Anything else?

See reference:
https://github.com/serverlessworkflow/specification/blob/v1.0.0/schema/workflow.yaml#L1190-L1197

Area(s)

Schema

Community Notes

  • Please vote by adding a 👍 reaction to the issue to help us prioritize.
  • If you are interested to work on this issue, please leave a comment.name: Bug Report 🐞

Metadata

Metadata

Assignees

Labels

area: specChanges in the Specificationchange: fixSomething isn't working. Impacts in a minor version change.type: bug

Type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions