Standardize 401 problem detail URLs with recoverable/unrecoverable categories#3003
Merged
jonathangreen merged 1 commit intomainfrom Jan 23, 2026
Merged
Conversation
…tegories Update all 401 authentication error URLs to use a new categorization scheme that helps mobile clients determine how to handle each error: - recoverable: client should automatically trigger re-authentication - unrecoverable: client should display the error to the user New URL pattern: http://palaceproject.io/terms/problem/auth/{category}/{auth-type}/{error} Recoverable errors (6): - PATRON_AUTH_ACCESS_TOKEN_EXPIRED - PATRON_AUTH_ACCESS_TOKEN_INVALID - INVALID_SAML_BEARER_TOKEN - SAML_AUTHENTICATION_ERROR - SAML_INVALID_RESPONSE - SAML_TOKEN_EXPIRED Unrecoverable errors (4): - INVALID_CREDENTIALS - SAML_NO_ACCESS_ERROR - SAML_INVALID_REQUEST - SAML_CANNOT_DETERMINE_PATRON
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3003 +/- ##
=======================================
Coverage 92.97% 92.97%
=======================================
Files 459 459
Lines 43276 43276
Branches 6034 6034
=======================================
Hits 40238 40238
Misses 1966 1966
Partials 1072 1072 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Update all 401 authentication error URLs to use a new categorization scheme that helps mobile clients determine how to handle each error:
New URL pattern:
http://palaceproject.io/terms/problem/auth/{category}/{auth-type}/{error}Recoverable errors (6)
Client should retry auth flow:
.../auth/recoverable/token/expired.../auth/recoverable/token/invalid.../auth/recoverable/saml/bearer-token-invalid.../auth/recoverable/saml/authentication-failed.../auth/recoverable/saml/invalid-response.../auth/recoverable/saml/session-expiredUnrecoverable errors (4)
Client should display error to user:
.../auth/unrecoverable/credentials/invalid.../auth/unrecoverable/saml/no-access.../auth/unrecoverable/saml/invalid-request.../auth/unrecoverable/saml/cannot-identify-patronMotivation and Context
This change enables mobile clients to distinguish between 401 errors that require re-authentication versus those that need to be displayed to the user, without having to track URLs over redirects or compare domains.
See Slack discussion: https://lyrasis.slack.com/archives/CCY3PH8JD/p1769101265956669
How Has This Been Tested?
Checklist