Hi,
Can you please share the entire request body and the response?
As part of the response, you should get an array that includes the relevant errors.
For instance:
{"type":"error","status":400,"message":"Validation faild","errors":[{"msg":"username is required","param":"username","location":"body"},{"msg":"Must be at least 3 chars long","param":"username","location":"body"},{"value":"12345","msg":"Password must contain at least 6 characters","param":"password","location":"body"}]}
I was getting 400s (every key was returned as an error) problem, and it was just because in the Postman UI was sending the raw data as 'text' instead of 'json'. 'text' seems to be the default in the Postman UI, so make sure you switch it to json and you will stop getting the 400 error.
By the way Julia, love this guide and all your detailed explanations. Thank you for sharing!
Hi, I'm glad you were able to solve this, and you're right, we need to make sure it's a JSON format before we send the request.
Thanks a lot! You're very welcome! :)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi,
Can you please share the entire request body and the response?
As part of the response, you should get an array that includes the relevant errors.
For instance:
Thanks!
I was getting 400s (every key was returned as an error) problem, and it was just because in the Postman UI was sending the raw data as 'text' instead of 'json'. 'text' seems to be the default in the Postman UI, so make sure you switch it to json and you will stop getting the 400 error.
By the way Julia, love this guide and all your detailed explanations. Thank you for sharing!
Hi, I'm glad you were able to solve this, and you're right, we need to make sure it's a JSON format before we send the request.
Thanks a lot! You're very welcome! :)