Better error message on failed token auth
JohnCMoon opened this issue · comments
John Moon commented
Currently, if you have a malformed MOZ_TOKEN
variable, the error that comes back is:
Format is Authorization: Bearer [token]
To me, it's not immediately obvious that there might be a problem with my token...
Maybe it would be good to add a line in that block with a more clear error message?
if !response.status().is_success() {
eprintln!("Token authentication failed");
response.json::<Error>().unwrap().fail();
}
Cheers!