func IsAuthorizationError(err error) bool {
	err = errgo.Cause(err)
	switch {
	case httpbakery.IsDischargeError(err):
		return true
	case httpbakery.IsInteractionError(err):
		return true
	case err == params.ErrUnauthorized:
		return true
	}
	return false
}
// IsAuthorizationError reports whether the given error
// was returned because authorization was denied for a
// charmstore request.
IsAuthorizationError reports whether the given error
was returned because authorization was denied for a
charmstore request.
// IsAuthorizationError reports whether the given error // was returned because authorization was denied for a // charmstore request .
func IsAuthorizationError(err error) bool {
	err = errgo.Cause(err)
	switch {
	case httpbakery.IsDischargeError(err):
		return true
	case httpbakery.IsInteractionError(err):
		return true
	case err == params.ErrUnauthorized:
		return true
	}
	return false
}
func IsAuthorizationError ( err error ) bool { err = errgo . Cause ( err ) switch { case httpbakery . IsDischargeError ( err ) : return true case httpbakery . IsInteractionError ( err ) : return true case err == params . ErrUnauthorized : return true } return false }
IsAuthorizationError reports whether the given error
was returned because authorization was denied for a
charmstore request.
IsAuthorizationError reports whether the given error was returned because authorization was denied for a charmstore request .