POST API always fails with property x should not be empty . www.spurtcommerce.com

24 views
Skip to first unread message

suresh s

unread,
Feb 4, 2020, 7:18:22 PM2/4/20
to nodejs

POST API always fails with property x should not be empty
For ex:
http://localhost:9000/api/auth/login

{
"message": "You have an error in your request's body. Check 'errors' field for more details!",
"status": 0,
"data": {
"message": [
"property username should not be empty",
"property username must be an email",
"property Password is required"
]
}
}

How do I fix this?

error: [api:middlewares/ErrorHandlerMiddleware] BadRequestError {"0":"Error: \n at BadRequestError.HttpError [as constructor] (/Users/simran/Downloads/Spurtcommerce_1.0_community_alpha/api/src/http-error/HttpError.ts:19:22)\n at new BadRequestError (/Users/simran/Downloads/Spurtcommerce_1.0_community_alpha/api/src/http-error/BadRequestError.ts:10:9)\n at /Users/simran/Downloads/Spurtcommerce_1.0_community_alpha/api/src/ActionParameterHandler.ts:191:40"}
info: [api:middlewares] POST /api/auth/login 422 1.979 ms - 235

Reply all
Reply to author
Forward
0 new messages