Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants