cancel
Showing results for 
Search instead for 
Did you mean: 

Error IDs - REST API

0 Kudos

Error IDs - REST API

Feature request from RUjmiak, posted on GitHub Jun 10, 2016

It would be great to have not just message as response when request is not successful.

For example adding product to cart

response 400 Bad request and message "You need to choose options for your item." or 400 Bad request and message "This product is out of stock." or 400 Bad request and message "We don't have as many \"Chaz Kangeroo Hoodie-XS-Gray\" as you requested."

Compare messages to identify error is not good approach... even when you want to connect to more magento websites with different languages...

Did you think about it?

Thanks

2 Comments
apiuser
New Member

Comment from choukalos, posted on GitHub Jun 13, 2016

Hi @RUjmiak yes we thought about enabling that level of error responses but for security reasons stuck to just error code in default and production mode. In developer mode you should see something similar to what you're requesting*. Our framework will detect missing fields but I think the reply could be improved further to make it easier to debug/etc.

apiuser
New Member

Comment from RUjmiak, posted on GitHub Jun 14, 2016

Thanks @choukalos for your reply. When I want to use API I want to use it on production mode and right now its really pain with this error messages. So in production mode is just error code?