Sha256: f7296d8232e5bcc5cd12716e7acad18df42b05a353025762ba2cacef20b40033
Contents?: true
Size: 541 Bytes
Versions: 30
Compression:
Stored size: 541 Bytes
Contents
# frozen_string_literal: true module SdrClient module Deposit # Handles unexpected responses when manipulating resources class UnexpectedResponse # @param [Faraday::Response] response def self.call(response) raise "There was an error with your request: #{response.body}" if response.status == 400 raise 'There was an error with your credentials. Perhaps they have expired?' if response.status == 401 raise "unexpected response: #{response.status} #{response.body}" end end end end
Version data entries
30 entries across 30 versions & 1 rubygems