Sha256: 0cfc851515dda3b03a2c51029af263ab4c3cf5ff2860c9c5ee15cc00f7664c95
Contents?: true
Size: 508 Bytes
Versions: 6
Compression:
Stored size: 508 Bytes
Contents
module Esendex class ApiErrorFactory 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 end class ApiError < StandardError end class NotAuthorizedError < ApiError end class ForbiddenError < ApiError end class AccountReferenceError < ApiError end end
Version data entries
6 entries across 6 versions & 1 rubygems