Skip to content

Commit

Permalink
docs: add infos on emitted errors
Browse files Browse the repository at this point in the history
  • Loading branch information
JacopoPatroclo committed Oct 20, 2024
1 parent a7fca0a commit 1ce418c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,5 +158,13 @@ fastify.register(require('fastify-response-validation'), {
})
```

## Errors

The errors emitted by this plugin are:

- `FST_RESPONSE_VALIDATION_FAILED_VALIDATION`: This error is emitted when a response does not conform to the provided schema.

- `FST_RESPONSE_VALIDATION_SCHEMA_NOT_DEFINED`: This error is emitted when there is no JSON schema available to validate the response.

## License
[MIT](./LICENSE)

0 comments on commit 1ce418c

Please sign in to comment.