Hey @mueeznarejo,
Thanks for using the plugin and reporting your issue.
Off the bat, the fact that it works in Postman but not in the browser makes me think that it’s related to how you’re making the call in the browser, can you give me some more info on that?
i.e. are you making the call from a JavaScript app / framework of some kind? Are you able to check the payload your are sending in the developer tools / console of your browser?
Also, is there any other message that comes back with the 400 code? All of the errors produced by the plugin should come with an error message.
Cheers,
Dominic,
-
This reply was modified 4 years, 3 months ago by
dominic_ks.
@dominic_ks
Yes, I am using React.js with Next.js as a front-end
POST https://test.hallarazad.com/wp-json/bdpwr/v1/reset-password 400
Error: Request failed with status code 400
at createError (createError.js?770c:16:1)
at settle (settle.js?8768:17:1)
at XMLHttpRequest.onloadend (xhr.js?1a5c:66:1)
@mueeznarejo
Thanks for that, though I don’t know if I can do much to help here without details of the request, I recommend checking the network tabs of the developer console in your browser and looking at the request payload. i.e. for this call checking that you are providing the email parameter and it’s properly formatted JSON.
And again, in the network tab, the actual response from your server, it should look something like this:
{
"code": "bad_email",
"message": "No user found with this email address.",
"data": {
"status": 500
}
}
Cheers,