question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

422 Unprocessable Entity

See original GitHub issue

HI,

I haven been facing this issue for a long time and I have no idea what can be happening. When I try to call the API productVariant.create(productId, data) after some requests I start receiving the message: Response code 422 (Unprocessable Entity)

I am sending this object as shown in this link

{ option1: 'Total Price 92.00', price: '92.00' }

The funny fact is that it works sometimes.

I would appreciate if you can help me with this.

Thank you

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
lpincacommented, Nov 3, 2017

I don’t know, does the response body include more details? The response is attached to the error:

try {
  await shopify.productVariant.create(productId, data);
} catch (err) {
  console.log(err.response.body);
}
0reactions
BeyondSpace609520commented, Dec 16, 2020

Hi, I have also faced same issue: shopify.productVariant .create("6145561297087", { title: "CUSTOM / CUSTQTY01", price: "24.99", }) .then((data) => console.log(data)) .catch((err) => console.error(err));

HTTPError: Response code 422 (Unprocessable Entity) at Request.<anonymous> (E:\Work\custom-shopify-server\node_modules\got\dist\source\as-promise\index.js:117:42) at processTicksAndRejections (internal/process/task_queues.js:97:5) { code: undefined,

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Fix the HTTP 422 Error - Kinsta
Error 422 is an HTTP code that tells you that the server can't process your request, although it understands it. The full name...
Read more >
400 vs 422 response to POST of data - Stack Overflow
422 Unprocessable Entity - When the request body can't be parsed. ... This is less severe than 400. The request has reached the...
Read more >
422 Unprocessable Entity - HTTP Status Code Glossary
What Is a 422 Status Code? ... The server understands the content type of the request entity (hence a 415 Unsupported Media Type...
Read more >
422 Unprocessable Entity Explained - KeyCDN Support
A 422 status code occurs when a request is well-formed, however, due to semantic errors it is unable to be processed.
Read more >
Troubleshooting - 422 Unprocessable Entity - Workato Docs
The 422 Unprocesable entity indicates that the action could not be processed properly due to invalid data provided. This occurs when there is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found