Skip to content

Commit

Permalink
feat(error-handling): 🚧 Creates an exception factory
Browse files Browse the repository at this point in the history
This PR is just to suggest an error factory suggested in feature request jumbojett#250  It doesn't covers all exceptions because I want to know if this can help or not.  It creates an exception factory in order to throw specific exceptions and user can handle exceptions without to compare messages
  • Loading branch information
huchim committed May 7, 2021
1 parent 90a36b6 commit ea43814
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/OpenIDConnectClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class OpenIDConnectExceptionFactory
private static $codes = array(
self::UNABLE_VERIFY_SIGNATURE => 'Unable to verify signature',
self::TOKEN_IS_NOT_STRING => 'Error token is not a string',
self::TOKEN_PART_MISSING => 'Error missing part 0 in token',
self::TOKEN_PART_MISSING => 'Error missing part %s in token',
self::UNABLE_DECODE_TOKEN => 'Error decoding signature from token',
self::UNABLE_DECODE_JSON_HEADER => 'Error decoding JSON from token header',
self::UNABLE_DECODE_JSON_JWKS_URI => 'Error decoding JSON from jwks_uri',
Expand Down

0 comments on commit ea43814

Please sign in to comment.