feat(core): add error and error_description fields to responses#2
Merged
halvaradop merged 3 commits intomasterfrom Oct 29, 2025
Merged
feat(core): add error and error_description fields to responses#2halvaradop merged 3 commits intomasterfrom
error and error_description fields to responses#2halvaradop merged 3 commits intomasterfrom
Conversation
error and error_description fields to responseserror and error_description fields to responses
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
This pull request adds support for the
erroranderror_descriptionproperties to standardize error handling in accordance with the OAuth 2.0 RFC specification.These properties define errors generated either by the application or by the third-party authorization service.
The implementation follows the RFC 6749, Section 5.2 guidelines for error responses from the
authorizationandaccess tokenendpoints.In this update, errors are returned as JSON objects in the response body, containing the fields
erroranderror_description.The supported error types include:
invalid_requestinvalid_clientinvalid_grantunauthorized_clientunsupported_grant_typeinvalid_scopeThis pull request primarily focuses on handling
invalid_requestandaccess_denied, which are among the most common errors returned by third-party OAuth services.Additionally, some parts of the codebase were refactored to integrate this new feature.
New tests were added, and existing tests were updated to ensure full compatibility with the latest implementation.
References for Future Error Handling Implementations