Request failed with status code 422

New Member
4 0 0

Hello Shopify

 

We require assistance with inconsistent closure from the Shopify API with error code 422 - which means there is a semantical error within the codes. However there has been no change to payments process on our end, the way the signature is created and data sent to you is consistent from our end.

 

We compared a successful transaction closure and a failed closure and the format is the same as well as the sending through the required information

 

Posted below stack-track output from our application side:

Error: Request failed with status code 422\n at createError (/app/node_modules/axios/lib/core/createError.js:16:15)\n at settle (/app/node_modules/axios/lib/core/settle.js:17:12)\n at IncomingMessage.handleStreamEnd (/app/node_modules/axios/lib/adapters/http.js:237:11)\n at IncomingMessage.emit (events.js:187:15)\n at endReadableNT (_stream_readable.js:1081:12)\n at process._tickCallback (internal/process/next_tick.js:63:19)

 

Example of the callback and fields we use, and it's consistant on our side:

{
"callbackUrl": "https://___shop_url___/services/ping/notify_integration/____/___shopid___",
"data": {
"x_account_id": "__string__",
"x_reference": "__number__",
"x_currency": "ZAR",
"x_test": "false",
"x_amount": "399.00",
"x_gateway_reference": "zap-___number__",
"x_timestamp": "2019-11-12T19:46:16Z",
"x_result": "completed",
"x_signature": "__string__"
}
}

 

We see this was raised in the forum with no clear solution provided: https://community.shopify.com/c/Shopify-APIs-SDKs/422-Unprocessable-Entity-Notification-acknowledgme...

 

Please, can this be looked into as a matter of urgency as we are seeing an increase in errors being returned from the Shopify API that is impacting a number of our merchants.

0 Likes
Shopify Staff
Shopify Staff
75 7 10

Hi @Keiran_van_Vuur,

 

Can you provide the request_id for some recent requests that failed? With those I can check our logs to find out why these failed. As well, can you let me know the date you first started seeing these failures?

JB | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes
Highlighted
New Member
4 0 0

Hi JB,

 

We started noticing these errors in September. Please see recent request-id's below when we are receiving the error. 

 

"x-request-id": "e923b931-667d-4c8c-a6c4-41654301ba2d"

"x-request-id": "d4adf7fb-bfff-4ccc-8944-d84b3b3a2b7d"

"x-request-id": "94ce06bb-5009-4286-81eb-185e1ff4691d"

"x-request-id": "c15efeac-a79f-44cb-aa85-4bbbeb3515c9"

"x-request-id" : "ec59d89a-ab8b-4f12-8129-5d90d2a50a32"

 

 

 

 

0 Likes
Shopify Staff
Shopify Staff
75 7 10

Hi @Keiran_van_Vuur,

 

I checked the logs and all errors are due to invalid signature. The errors are coming from the same 3 shops and I don't see any successful requests from these shops, so they're most likely using invalid credentials. Please have these shops check and fix their gateway credentials, and requests should complete as expected.

JB | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes
New Member
4 0 0

Hi JB,

 

Thank you for the assistance with this. We have reached out to the merchants to confirm credentials being used. 

 

Thanks again.

0 Likes