You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for taking the time to fill out this feature request!"
I have searched the issue tracker for similar requests
Which @snicco/* package(s) are relevant/related of the feature request?
wp-nonce-middleware
Description
It would be good to replace the generic HttpException thrown in the VerifyWPNonce middleware with a custom exception class so that it can be caught explicitly and transformed into a user-friendly error view.
Proposed solution
if (! $this->wp->verifyNonce($nonce, $current_path)) {
thrownewHttpException(401, sprintf('Nonce check failed for request path [%s].', $current_path));
}
We can replace the above code WITHOUT a BC break if we create a new exception class that extends HttpException.
classWPNonceIsInvalidextendsHttpException {
//
}
Alternatives
No response
The text was updated successfully, but these errors were encountered:
Thanks for taking the time to fill out this feature request!"
Which @snicco/* package(s) are relevant/related of the feature request?
wp-nonce-middleware
Description
It would be good to replace the generic
HttpException
thrown in theVerifyWPNonce
middleware with a custom exception class so that it can be caught explicitly and transformed into a user-friendly error view.Proposed solution
We can replace the above code WITHOUT a BC break if we create a new exception class that extends
HttpException
.Alternatives
No response
The text was updated successfully, but these errors were encountered: