passwordless
passwordless copied to clipboard
400 Bad Request - insufficient error
I keep getting an error 400 "Bad request" on the client side. I tracked it down to this line:
} else if(!deliveryMethod || !user) {
return sendError(400);
}
Just "400" alone isn't a very good error. A slightly better message would be "delivery method or user missing" but obviously this is only slightly better.
If someone can either point me in the right direction or confirm that the above error message is good, i'll make a PR.
The actual problem I had was that I used body-parser wrong. just for info..
Thinking about it I could have used a check where an empty or missing body gives an error.