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

Unauthorized (401) response not processed correctly #188

Closed
olayinkasf opened this issue Jun 2, 2017 · 4 comments
Closed

Unauthorized (401) response not processed correctly #188

olayinkasf opened this issue Jun 2, 2017 · 4 comments
Labels

Comments

@olayinkasf
Copy link

The Problem created for the response below doesn't contain enough information to understand

{"error":"unauthorized","error_description":"Full authentication is required to access this resource"}

Problem{type=about:blank, title='null', status=0, detail='null', instance=null, data=null}

Perhaps the line

    if (problem.status() == 0 && response.statusCode() == 400) 

should accommodate for 401 as well

@dehora
Copy link
Owner

dehora commented Jun 2, 2017

Unauthorized (401) response not processed correctly
The Problem created for the response below doesn't contain enough information to understand

This is related to Nakadi's zalando/nakadi#645 - the server returns the wrong structure and the wrong response code for certain auth failures (the line you referenced is a client workaround). Do you have an example request of a bad response structure returned with a 401?

@dehora dehora added the feature label Jun 3, 2017
dehora added a commit that referenced this issue Jun 3, 2017
The server doesn't return the correct response code or structure
for some auth issues. This is hack to inspect the response returned
by the server to allow auth errors to be retryable and provide
usable diagnostics to end users.

For #188.
See also: 3f3d266.
dehora added a commit that referenced this issue Jun 3, 2017
The server doesn't return the correct response code or structure
for some auth issues. This is hack to inspect the response returned
by the server to allow auth errors to be retryable and provide
usable diagnostics to end users.

For #188.
See also: 3f3d266.
dehora added a commit that referenced this issue Jun 3, 2017
The server doesn't return the correct response code or structure
for some auth issues. This is hack to inspect the response returned
by the server to allow auth errors to be retryable and provide
usable diagnostics to end users.

For #188.
See also: 3f3d266.
@dehora
Copy link
Owner

dehora commented Jun 3, 2017

There's a workaround in 0.8.6. It's be great if you could go upstream and comment on or like zalando/nakadi#645. Having to patch around what should be a simple server fix in api clients is unfortunate.

@dehora dehora closed this as completed Jun 3, 2017
@olayinkasf
Copy link
Author

Actually, it suffices for me to not provide an access token and I get a 401 response.

@meghana-khr
Copy link

Did you solve this problem??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants