Class: Esendex::ApiErrorFactory
- Inherits:
-
Object
- Object
- Esendex::ApiErrorFactory
- Defined in:
- lib/esendex/exceptions.rb
Instance Method Summary collapse
Instance Method Details
#get_api_error(source_error) ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/esendex/exceptions.rb', line 3 def get_api_error(source_error) case source_error when Nestful::ForbiddenAccess return ForbiddenError.new when Nestful::UnauthorizedAccess return NotAuthorizedError.new else return ApiError.new(source_error) end end |