Skip to content

Preserve warnings on async validation errors - #3132

Open
jackwalkerlabs wants to merge 1 commit into
hapijs:masterfrom
jackwalkerlabs:fix/async-validation-warnings
Open

Preserve warnings on async validation errors#3132
jackwalkerlabs wants to merge 1 commit into
hapijs:masterfrom
jackwalkerlabs:fix/async-validation-warnings

Conversation

@jackwalkerlabs

Copy link
Copy Markdown

Fixes #3100

Summary

  • attach warnings generated before rejected async validation to the ValidationError when warnings are enabled
  • apply the same behavior to ordinary and external validation errors while preserving debug output
  • document and type the optional error.warning result

Testing

  • npm test (1,820 tests, 48,077 assertions, 100% coverage, lint and types clean)

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.

Warning on rejected async validation

1 participant