Skip to content

chore: Use constants for all errors - #2676

Open
TobCar wants to merge 1 commit into
supabase:masterfrom
TobCar:refactor/oauth-error-code-constants
Open

chore: Use constants for all errors#2676
TobCar wants to merge 1 commit into
supabase:masterfrom
TobCar:refactor/oauth-error-code-constants

Conversation

@TobCar

@TobCar TobCar commented Aug 4, 2026

Copy link
Copy Markdown

What kind of change does this PR introduce?

Inspired by #2660 this PR introduces constants for all errors.

What is the current behavior?

The repo was using strings for each error code.

While updating these, I actually discovered token_oidc.go had an error code that violates RFC 6749: invalid request is not allowed to have a space.

What is the new behavior?

The apierrors package containts a constant with every error code emitted. I also fixed invalid request -> invalid_request.

@TobCar
TobCar requested a review from a team as a code owner August 4, 2026 16:36
@TobCar
TobCar force-pushed the refactor/oauth-error-code-constants branch from 0875c8b to 1fcb2f0 Compare August 4, 2026 16:37
@TobCar

TobCar commented Aug 4, 2026

Copy link
Copy Markdown
Author

ptal @cstockton

@TobCar TobCar changed the title Use constants for all errors chore: Use constants for all errors Aug 4, 2026
@TobCar
TobCar force-pushed the refactor/oauth-error-code-constants branch from 1fcb2f0 to 522721c Compare August 4, 2026 19:27
@TobCar
TobCar force-pushed the refactor/oauth-error-code-constants branch from 522721c to 6390ecd Compare August 5, 2026 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant