Closed Haideralee closed 3 years ago
Not all errors have the response
property. Sometimes the error occurs before the HTTP response is received.
I understand not all errors have response property but errors have some legit detail about the error right ? if you look 1 screenshot there no clue why and what kind of error was it.
and it's the same endpoint I was calling with same credentials but it's send me sometimes proper error detail and sometimes it's just send me wired error object.
If you google EAI_AGAIN
you'll see that it's a DNS lookup timeout error. There is also a clear distinction between HTTP errors (HTTPError
) and generic request errors (RequestError
). Errors are handled by got
, the HTTP library used by shopify-api-node
.
I'm closing this as answered. Discussion can continue if needed.
Hi, I am trying to create a customer and if a customer already existing then I am expecting '
error.response.body
' to have error detail but it's sending an unexpected and inconsistent response. sometimes it's given me a complete proper error and sometimes gives an incomplete error where the response undefined.I am attaching an errors screenshot
incomplete error screenshot
complete error screenshot