Closed andrewhavens closed 5 years ago
Hi Andrew
There are actually quite a few error types they do not explicitly document on the page I use as reference. I originally decided not to include any for the sake of consistency and future maintenance.
If you need to rescue InvalidRequestException
in your code, you could explicitly define it when initialising your app.
require 'peddler/errors/error'
module Peddle
module Errors
InvalidRequestException = Class.new(Error)
end
end
Thanks for taking the time to submit the PR.
I think the Amazon documentation might be outdated since it is missing
InvalidRequestException
from its list of known error codes. I have seen this error in cases like this:Since error classes are dynamically created, the constant that was being defined was
Peddler::Errors::InvalidRequestException
. However, I couldn't figure out why I couldn't rescue from that type of error and getting undefined constant errors. Turns out it was missing from this list.