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

feat: add req to onError handler for response validation #564

Merged
merged 2 commits into from
Mar 21, 2021

Conversation

0xCAFEADD1C7
Copy link
Contributor

Hello 👋

First of all thanks for this project, we've been using it in my company for some time now and it's really helpful 👍

The goal of this PR is simply to add the express request object to the onError handler for response validation. Our use case is that in case of error, we want to log the failing response with our logger, which is bound to the request (so that we have the request context), but I think that we can imagine a lot of useful use-cases to use the request here :)

@cdimascio cdimascio merged commit 52d81a0 into cdimascio:master Mar 21, 2021
@cdimascio
Copy link
Owner

@all-contributors add @0xCAFEADD1C7 for code and test

@allcontributors
Copy link
Contributor

@cdimascio

I've put up a pull request to add @0xCAFEADD1C7! 🎉

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.

2 participants