Skip to content
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

Format informative errors for workflow schema validation #4028

Merged
merged 1 commit into from
Sep 23, 2019

Conversation

no-reply
Copy link
Contributor

This is a hack at formatting errors for workflow schema issues.

The new errors are formatted like:

Error on workflow entry [:workflows, 0, :label]
      label must be filled
      Got:
Error on workflow entry [:workflows, 0, :description]
      description must be filled
      Got:
Input was:
      {:workflows=>[{:name=>"ulra_submission", :label=>"", :description=>"",
      :actions=>[{:name=>"approve", :from_states=>[{:names=>["under_review"],
      :roles=>["ulra_reviewing"]}], :transition_to=>"reviewed"}]}]}

Fixes #267.

Guidance for testing, such as acceptance criteria or new user interface behaviors:

  • In a test application, update a workflow schema configuration to an invalid format. Observe the new and improved error messages.

@samvera/hyrax-code-reviewers

This is a hack at formatting errors for workflow schema issues.

The new errors are formatted like:

```
Error on workflow entry [:workflows, 0, :label]
      label must be filled
      Got:
Error on workflow entry [:workflows, 0, :description]
      description must be filled
      Got:
Input was:
      {:workflows=>[{:name=>"ulra_submission", :label=>"", :description=>"",
      :actions=>[{:name=>"approve", :from_states=>[{:names=>["under_review"],
      :roles=>["ulra_reviewing"]}], :transition_to=>"reviewed"}]}]}
```

Fixes #267.
@elrayle elrayle merged commit 7a96970 into master Sep 23, 2019
@elrayle elrayle deleted the workflow-schema-errors branch September 23, 2019 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Workflow schema validation errors should include more information
2 participants