Skip to content
This repository was archived by the owner on Apr 5, 2020. It is now read-only.

Fix for global exception handling.#22

Merged
thekid merged 2 commits into
xp-framework:masterfrom
johannes85:authfilter-ex
Mar 17, 2017
Merged

Fix for global exception handling.#22
thekid merged 2 commits into
xp-framework:masterfrom
johannes85:authfilter-ex

Conversation

@johannes85
Copy link
Copy Markdown
Contributor

Since in the end, the handler is called by this function:
return false === $r ? $r : $invocation->proceed($request, $response);
Every unhandled exception thrown in the handler will be converted into an ScriptletException with the "forbidden" error code.
This breaks the global error handling.

As a solution, I moved the call to an position outside of the try..catch block, in the assumtion that the error handling only is relevant for the "authenticate" call.

@thekid
Copy link
Copy Markdown
Member

thekid commented Mar 17, 2017

+1, we should have some tests for this

@thekid thekid merged commit 92ff851 into xp-framework:master Mar 17, 2017
@thekid
Copy link
Copy Markdown
Member

thekid commented Mar 17, 2017

Released in v8.4.5, thanks @johannes85!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants