Reconsider Error variants

BadServerResponse didn't seem to be adequately different from
NegativeServerResponse so it's been removed. NegativeServerResponse is
now a struct variant with field names 'error' and 'error_description' to
self document what it contains.

InvalidClient and InvalidScope were only ever created based on string
parsing of the returned error message from the server. This seemed
overly specific to a particular implementation and didn't provide much
value to callers. Printing a NegativeServerResponse would provide users
the same information.

The caching layer never returns errors anymore so remove that variant.
This commit is contained in:
Glenn Griffin
2019-11-21 10:42:08 -08:00
parent 25ba7f0b1f
commit 8030d31da9
3 changed files with 32 additions and 51 deletions

View File

@@ -1,6 +1,6 @@
//! Module containing types related to delegates.
use crate::error::{RefreshError};
use crate::error::RefreshError;
use std::error::Error as StdError;
use std::fmt;