Sha256: d943ae97c52b8c8b73dfbe4e46b04d3526a9dc4089a41e7d9da1d03536c2461e

Contents?: true

Size: 310 Bytes

Versions: 7

Compression:

Stored size: 310 Bytes

Contents

# frozen_string_literal: true

module Strava
  module Errors
    class Fault < ::Faraday::ClientError
      def message
        response[:body]['message'] || super
      end

      def headers
        response[:headers]
      end

      def errors
        response[:body]['errors']
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
strava-ruby-client-2.2.0 lib/strava/errors/fault.rb
strava-ruby-client-2.1.0 lib/strava/errors/fault.rb
strava-ruby-client-2.0.0 lib/strava/errors/fault.rb
strava-ruby-client-1.1.0 lib/strava/errors/fault.rb
strava-ruby-client-1.0.1 lib/strava/errors/fault.rb
strava-ruby-client-1.0.0 lib/strava/errors/fault.rb
strava-ruby-client-0.4.3 lib/strava/errors/fault.rb