Sha256: b2705c8500b5abff28d948db619b64c6b6fa7c9737c3012859a603d487d7c1dc
Contents?: true
Size: 844 Bytes
Versions: 12
Compression:
Stored size: 844 Bytes
Contents
# frozen_string_literal: true require 'friendly_shipping/services/ship_engine/bad_request' module FriendlyShipping module Services class ShipEngine class BadRequestHandler extend Dry::Monads::Result::Mixin def self.call(error, original_request: nil, original_response: nil) if error.http_code == 400 Failure( ApiFailure.new( BadRequest.new(error), original_request: original_request, original_response: original_response ) ) else Failure( ApiFailure.new( error, original_request: original_request, original_response: original_response ) ) end end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems