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

Improve auth error messages #84

Open
jeff-cohere opened this issue Nov 12, 2024 · 0 comments
Open

Improve auth error messages #84

jeff-cohere opened this issue Nov 12, 2024 · 0 comments

Comments

@jeff-cohere
Copy link
Collaborator

From Ken Chu:

I tried

curl --request GET \
  --url https://lb-dts.staging.kbase.us/api/v1/databases/jdp \
  --header 'Accept: application/json, application/problem+json' \
  --header 'authorization: 7ISG------------'

where ---- is hidden. I get this error:

{"$schema":"https://lb-dts.staging.kbase.us/schemas/ErrorModel.json","title":"Internal Server Error","status":500,"detail":"Invalid authorization header"}

...

A little closer, now a 401 error.

curl --request GET   --url https://lb-dts.staging.kbase.us/api/v1/databases/jdp   --header 'Accept: application/json, application/problem+json'   --header 'Authorization: Bearer 7ISG---'
{"$schema":"https://lb-dts.staging.kbase.us/schemas/ErrorModel.json","title":"Unauthorized","status":401,"detail":"Get \"[https://kbase.us/services/auth/api/V2/me\](https://kbase.us/services/auth/api/V2/me/)": net/http: invalid header field value for \"Authorization\""}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant