Sha256: 023ddab3da815f961f71c6084b79b794ad1d59398e3b6b76bc01abd11be3babd

Contents?: true

Size: 391 Bytes

Versions: 1

Compression:

Stored size: 391 Bytes

Contents

require 'minato_error_handler'

module MinatoRubyApiClient
  class ApiError < MinatoErrorHandler::Errors::ExternalError
    attr_reader :status_code

    def initialize(res: nil, req: nil, status_code: 500)
      super(req: req, res: res)
      @status_code = status_code
    end

    def message
      "An error occurred while communicating with the API."
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
minato_ruby_api_client-0.2.1 lib/minato_ruby_api_client/api_error.rb