Showing results for 
Search instead for 
Did you mean: 

Getting internal server error when posting wrong parameter in API request

0 Kudos

Getting internal server error when posting wrong parameter in API request

Feature request from cedcommerce, posted on GitHub Jan 30, 2017

I am getting 500 internal server error when I am posting wrong parameter in API request. I was trying to create customer through API while posting customer data, I posted groupid instead of group_id and that shows me 500 internal server error.

Preconditions Magento 2.1.0 CE (or above)

Steps to reproduce

  1. Open magento_site_url/swagger documentation (
  2. Open tab customerAccountManagementV1 ->Post /V1/customers to create account
  3. Post customer data to create customer account with all correct information, instead of passing group_id pass groupid (we can try with any other parameters too).
  4. Click on Try it Out! button

    Result { "message": "Internal Error. Details are available in Magento log file. Report ID: webapi-588f3c623a140" }

    Expected Result

You had passed invalid parameters in your request, groupid doesn't exist in the request parameters. (Something like this)

As i had the access of server so i got my error but there is no process in magento to handle this error and show a correct/useful message, so that API user will be able to get what exact error they made in their API request. # 1 2

New Member
Status changed to: Investigating
New Member

Comment from misha-kotov, posted on GitHub Feb 07, 2017

Totally understand your case. We have some items on the roadmap to improve error handling in APIs, and I'll add the details of your use case to them as well (specifically MAGETWO-64312)