Sha256: be0f4a5657ceed45d40577d99104becc88653e2873593ad9e31517802de02b78
Contents?: true
Size: 438 Bytes
Versions: 7
Compression:
Stored size: 438 Bytes
Contents
module Mailstro module Middleware module Response class RaiseError < Faraday::Response::RaiseError def on_complete(env) case env[:status] when 401 raise Error::AuthorisationError.new("api_key not authorised", env) when 422 raise Error::ValidationError.new(env[:body][:errors]) else super end end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems