Skip to content

feat(core): add error and error_description fields to responses#2

Merged
halvaradop merged 3 commits intomasterfrom
feat/add-erros-to-responses
Oct 29, 2025
Merged

feat(core): add error and error_description fields to responses#2
halvaradop merged 3 commits intomasterfrom
feat/add-erros-to-responses

Conversation

@halvaradop
Copy link
Copy Markdown
Member

@halvaradop halvaradop commented Oct 28, 2025

Description

This pull request adds support for the error and error_description properties 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 authorization and access token endpoints.

In this update, errors are returned as JSON objects in the response body, containing the fields error and error_description.
The supported error types include:

  • invalid_request
  • invalid_client
  • invalid_grant
  • unauthorized_client
  • unsupported_grant_type
  • invalid_scope

This pull request primarily focuses on handling invalid_request and access_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

@halvaradop halvaradop changed the title feat(oauth): add error and error_description fields to responses feat(core): add error and error_description fields to responses Oct 29, 2025
@halvaradop halvaradop merged commit 97c7acf into master Oct 29, 2025
@halvaradop halvaradop deleted the feat/add-erros-to-responses branch October 29, 2025 23:14
@halvaradop halvaradop added enhancement New feature or request feature New functionality labels Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request feature New functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant