Closed andrewhavens closed 5 years ago
@andrewhavens, thanks for reporting.
This looks like an edge case. I'm adding a guard so we correctly bubble up the original HTTP status error.
About logging, I think it's best if you did this on your end? When hitting MWS, you could simply rescue, log, and re-raise.
I noticed an error in our logs:
After further investigation, I realized it was happening inside peddler. A call to
get_fulfillment_order
resulted in an error response from MWS. However, peddler had a problem trying to determine the error code.I looked at the peddler source, and it looks like the problem is that
parse
returned nil. https://github.com/hakanensari/peddler/blob/master/lib/peddler/errors/parser.rb#L18Unfortunately, I'm not sure what the response looked like, since the HTTP requests aren't being logged in production.
I'm not sure exactly what the solution should be. Maybe peddler should default to something if it can't determine the error code. If there's some sort of MWS error response logging that I can enable, that would be helpful, but I don't know if such a feature exists.