Calling Moltin.Products.UpdateRelationships(moltinId, 'category', []) fails
See original GitHub issueHi!
Calling await Moltin.Products.UpdateRelationships(moltinId, 'category', [])
to clear all Product <=> Category
relationships fails with the following error:
{
"message": {
"errors": [
{
"status": 500,
"title": "Internal Server Error",
"detail": "There was an internal server error, you can report with your request id.",
"request_id": "6c8b4050dc4c0eb2"
}
]
}
}
Although a PUT
request directly placed to the endpoint works.
Take a look at the code here on Line: 8
All other return statements return an Array
whereas, this line returns a string. Which I suppose is again converted to JSON string with JSON.stringify(body)
resulting in "[]"
instead of []
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Category Relationship - Elastic Path Documentation
Create a Product relationship to one or more Categories. If any relationships already exist, the ones made in the request are added to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Looks like your hypothesis is correct! 😄
I’m using it in the backend. I need to do a quick browser test to get the request payload from the sdk. Hold on.