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

Return actual status codes instead of 400 #52

Closed
wants to merge 2 commits into from

Conversation

fischor
Copy link
Collaborator

@fischor fischor commented Dec 23, 2021

Status codes sometimes get rewritten to simply 400.
This happens e.g. when on a Write when there is an authentication issue that should actually return code 401.

With this PR the actual status codes are propagated.

Copy link
Member

@zekroTJA zekroTJA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some issues which might occur using your error handling. But resolving this might result in deeper changes in the codebase, so I would really like to invite the other maintainers to this discussion.

requests.go Show resolved Hide resolved
@fischor
Copy link
Collaborator Author

fischor commented Dec 24, 2021

There has already an issue for error handling been raised with #28.

requests.go Show resolved Hide resolved
@zekroTJA
Copy link
Member

I would consider this PR to be sufficient for now but I don't want to merge it without @chripo taking a look over it and confirming it before as well.

@chripo
Copy link
Member

chripo commented Jan 27, 2022

Thank you for reporting and further investigations.
I really appreciate it!
I'm going to close it in favor of GH-54

@chripo chripo closed this Jan 27, 2022
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.

3 participants