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

Add request object to callback for errors - #141

Open
TiMESPLiNTER wants to merge 2 commits into
tuupola:3.xfrom
jobcloud:provide-request-for-callbacks
Open

Add request object to callback for errors#141
TiMESPLiNTER wants to merge 2 commits into
tuupola:3.xfrom
jobcloud:provide-request-for-callbacks

Conversation

@TiMESPLiNTER

@TiMESPLiNTER TiMESPLiNTER commented Dec 3, 2018

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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