Closed JacopoPatroclo closed 4 weeks ago
Very good addition using
@fastify/error
. As I said in my comments, I'd personally leave the discussion about the opportunity of introducingisResponseValidationError
to another pr.
I agree. I'll open a new PR with this feature if @mcollina is fine with exposing a new utility function for it. Meanwhile I think this one is now ready to be merged in.
The aim of this PR is to address the issue https://github.com/fastify/fastify-response-validation/issues/121.
I’ve migrated the errors emitted by this plugin to use
@fastify/error
, which has enabled the creation of a utility function to check if the error is actually coming from this plugin by using the error code. This makes it easier for consumers to implement specific error-handling logic around it.Checklist
npm run test
andnpm run benchmark