Closed marytal closed 4 years ago
What line is throwing that error—could you paste here the traceback?
Sorry, here it is:
vendor/bundle/ruby/2.6.0/gems/peddler-2.3.0/lib/peddler/errors/builder.rb:34:in `initialize': wrong number of arguments (given 2, expected 0..1) (ArgumentError)
from vendor/bundle/ruby/2.6.0/gems/peddler-2.3.0/lib/peddler/errors/builder.rb:34:in `new'
from vendor/bundle/ruby/2.6.0/gems/peddler-2.3.0/lib/peddler/errors/builder.rb:34:in `build'
from vendor/bundle/ruby/2.6.0/gems/peddler-2.3.0/lib/peddler/errors/builder.rb:20:in `call'
from vendor/bundle/ruby/2.6.0/gems/peddler-2.3.0/lib/peddler/client.rb:152:in `handle_http_status_error'
from vendor/bundle/ruby/2.6.0/gems/peddler-2.3.0/lib/peddler/client.rb:121:in `rescue in run'
from vendor/bundle/ruby/2.6.0/gems/peddler-2.3.0/lib/peddler/client.rb:113:in `run'
# frozen_string_literal: true
module Peddler
module Errors
class InvalidMarketplace < StandardError; end
end
end
It's a "type error." You need to inherit from Peddler::Errors::Error
, not StandardError
. I added a guard to alert about this in runtime, which should make things more resilient.
Thank you!!
Hey! I'm attempting to submit an inventory update feed, but the account I'm submitting it for is suspended. Instead of getting
Peddler::Errors::InvalidMarketplace
, I seeArgumentError · wrong number of arguments (given 2, expected 0..1)
I cannot rescue
Peddler::Errors::InvalidMarketplace
(even though I've defined the error in my repo) because I'm thinking the parsing error happens before it gets translated.Feed Response (through ScratchPad)
Steps to reproduce:
Thanks for your help (and this gem)!