lib/adyen/rest/errors.rb in adyen-2.0.0.pre1 vs lib/adyen/rest/errors.rb in adyen-2.0.0.pre2
- old
+ new
@@ -1,24 +1,24 @@
module Adyen
module REST
# The main exception class for error reporting when using the REST API Client.
- class Error < ::StandardError
+ class Error < Adyen::Error
end
# Exception class for errors on requests
- class RequestValidationFailed < Error
+ class RequestValidationFailed < Adyen::REST::Error
end
# Exception class for error responses from the Adyen API.
#
# @!attribute category
# @return [String, nil]
# @!attribute code
# @return [Integer, nil]
# @!attribute description
# @return [String, nil]
- class ResponseError < Error
+ class ResponseError < Adyen::REST::Error
attr_accessor :category, :code, :description
def initialize(response_body)
if match = /\A(\w+)\s(\d+)\s(.*)\z/.match(response_body)
@category, @code, @description = match[1], match[2].to_i, match[3]