Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use 403 for authorization errors [HUB-158] #742

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

amcgee
Copy link
Member

@amcgee amcgee commented Sep 30, 2024

401 is called "unauthorized" but this is a bug in the HTTP spec - see https://stackoverflow.com/questions/3297048/403-forbidden-vs-401-unauthorized-http-responses

403 should be used if a user is correctly authenticated but does not have sufficient permission to perform an action

I'm leaving this as a draft for now so we can decide whether we want to also improve other HTTP status codes (like 201 for creation) and so we can evaluate how "breaking" this change is...

@amcgee amcgee changed the title fix: use 403 for authorization errors fix: use 403 for authorization errors [HUB-158] Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants