Hello,
It seems that the auth crate doesn't properly parse response errors when the authentication configuration is invalid.
I was trying to use GKE Workload Identity as the auth method behind the with_auth() function, and the crate just returned a decode error (probably because the response wasn't what the decoder expected), which made debugging my configuration more difficult.
What do you think about returning a clearer error message for client auth errors? Does that make sense?
I’d be happy to open a PR with this suggestion if you're open to it.
HttpError(reqwest::Error { kind: Decode, source: Error("expected value", line: 1, column: 1) })
Just to clarify, Workload Identity on GKE works fine, this suggestion is only about improving the clarity of error messages in such cases.
Hello,
It seems that the auth crate doesn't properly parse response errors when the authentication configuration is invalid.
I was trying to use GKE Workload Identity as the auth method behind the with_auth() function, and the crate just returned a decode error (probably because the response wasn't what the decoder expected), which made debugging my configuration more difficult.
What do you think about returning a clearer error message for client auth errors? Does that make sense?
I’d be happy to open a PR with this suggestion if you're open to it.
Just to clarify, Workload Identity on GKE works fine, this suggestion is only about improving the clarity of error messages in such cases.