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.