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

Add request object to callback for errors #141

Open
wants to merge 2 commits into
base: 3.x
Choose a base branch
from
Open

Add request object to callback for errors #141

wants to merge 2 commits into from

Conversation

TiMESPLiNTER
Copy link
Contributor

@TiMESPLiNTER TiMESPLiNTER commented Dec 3, 2018

Sometimes it's useful or required to have information of the request available to form a proper response.

For example the Accept header of the request is required to decide in which format the response should be generated.

This would be a BC break. So maybe not for 3.x but for 4.x...

If we want to omit a BC we can just change the order of the args for the error callback and append the request to the end of the arguments. That way existing closures/callbacks would still work.

@tuupola tuupola added the 4.x label Dec 22, 2018
@TiMESPLiNTER
Copy link
Contributor Author

@tuupola should I change the order of arguments so we can already use it in a 3.x release without breaking anything?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants