Module: Safire::Errors
- Defined in:
- lib/safire/errors.rb
Overview
Namespace for all Safire error classes.
Every Safire error inherits from Error so consumers can rescue all Safire errors with a single rescue Safire::Errors::Error. Each subclass exposes typed, domain-specific attributes and builds its own human-readable message.
OAuth 2.0 protocol errors (TokenError, AuthError, RegistrationError) share the same HTTP-failure shape and inherit from OAuthError, which can be used as a single rescue point for any server-side OAuth failure:
rescue Safire::Errors::OAuthError => e
puts e.status # HTTP status code
puts e.error_code # OAuth2 error field
Defined Under Namespace
Modules: ReceivesFields Classes: AuthError, CertificateError, ConfigurationError, DiscoveryError, Error, NetworkError, OAuthError, RegistrationError, TokenError, ValidationError