Skip to content

Commit

Permalink
Merge branch 'implement_ruby_errors' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
Krisztian Szabo committed Mar 31, 2015
2 parents 69d3db1 + 612f5c2 commit fc79cef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/mkto_rest/errors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ class MktoRest::Errors
}

RESPONSE_CODE_TO_ERROR.values.each do |class_name|
const_set(class_name, Class.new(Exception))
const_set(class_name, Class.new(StandardError))
end

Unknown = Class.new(Exception)
Unknown = Class.new(StandardError)

def self.find_by_response_code(response_code)
const_get(RESPONSE_CODE_TO_ERROR.fetch(response_code, 'Unknown'))
Expand Down

0 comments on commit fc79cef

Please sign in to comment.