sferik/mlb-ruby

View on GitHub
lib/mlb/errors/http_error.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
require "json"
require_relative "error"

module MLB
  class HTTPError < Error
    attr_reader :response, :code

    def initialize(response:)
      super(response.message)
      @response = response
      @code = response.code
    end
  end
end