Skip to content

WebAPI REST POST /V1/products gives a generic error in response, without any details. #5338

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
karanbhomiagit opened this issue Jun 29, 2016 · 3 comments

Comments

@karanbhomiagit
Copy link

Steps to reproduce

  1. Install Magento from develop branch.
  2. Try creating a simple product by making a call to REST API POST /V1/products.
  3. [Example]
    { "product": { "sku": "atoi-item", "name": "atoi-item", "status": "1", "type_id": "simple", "visibility": "4", "attribute_set_id": "4", "price": "3", "custom_attributes": [ { "attribute_code": "description", "value": "descreeeeeeption" }, { "attribute_code": "category_ids", "value": [ "1", "2" ] } ] } }

I get a response : Status code 400.
Body : {
"message": "Unable to save product"
}

Expected result

  1. Error message in the response body should be more specific.
    There are so many field values that are required to be set on the request JSON, there is no way for the person making the request to identify where the request went wrong.

Actual result

  1. [Example] Error message appears: "Unable to save product".
@srinivasanithin
Copy link

Error messages needs to enhanced otherwise much time is getting wasting in these troubleshoot this cause for failure.

@piotrekkaminski
Copy link
Contributor

Thank you for your submission.

We recently made some changes to the way we process GitHub submissions to more quickly identify and respond to core code issues.

Feature Requests and Improvements should now be submitted to the new Magento 2 Feature Requests and Improvements forum (see details here).

We are closing this GitHub ticket and have moved your request to the new forum.

@signalprime
Copy link

This issue is not resolved here or in the forums. I also have the same problem, everything looks fine. But perhaps with some Magento2 upgrade, things have changed and we don't know what is wrong with our requests.

magento-cicd2 pushed a commit that referenced this issue Apr 28, 2020
[TR] MC-31567: Migrate ZF components to Laminas part 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants