Skip to content

WorkspaceOAuthProvider::fetch_token doesn't check HTTP status code. #3739

@ryzhyk

Description

@ryzhyk

If the user provides invalid credentials, /oidc/v1/token returns HTTP status 403 in this line:

.map_err(UnityCatalogError::from)?

However the function doesn't check HTTP status code and instead proceeds to parse the JSON body of the message, leading to an unhelpful error message about missing token field in the message.

I think the right thing to do here is to check for 2xx HTTP status before parsing response body.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions