馃悰 Bug: V2 API returns wrong status code and message combination on 401 and 403 #7272
Closed
1 task done
Labels
Status: Reproducible
Able to reproduce the issue based on the reporters' guideline.
Please confirm if bug report does NOT exists already ?
Steps to reproduce ?
I am working on API response status message handling.
When working with personal API tokens, NocoDB returns "403" status code with message "Unauthorized" in both of those cases:
In both of those cases response status and message combination is contradicting.
403 is actually "Forbidden" (not "Unauthorized") and is generally used to indicate that the server recognizes the client's credentials, but those credentials don't grant permission to access the requested resource.
"Unauthorized" is actually a message for status code "401" (not "403") and is typically used when authentication has failed or hasn't been provided.
Desired Behavior
Project Details
Docker: true
PackageVersion: 0.202.10
Node: v18.18.2
Arch: x64
Platform: linux
RootDB: pg
Database version : 15.5
Attachments
No response
The text was updated successfully, but these errors were encountered: