Hello, I am trying to use the properties parameter with ctx.throw but I do not see the object added anywhere in the response. For example, if part of a request message is missing, I want to do something like the following:
if (!username) {
return ctx.throw(400, 'Invalid request message', {
validationErrors: {
username: 'Username cannot be null',
},
});
}
When I try to do a console.log of the response, I see the status and message set properly but I do not see the validationErrors object in the response. Any suggestions on this are appreciated.
Hello, I am trying to use the properties parameter with ctx.throw but I do not see the object added anywhere in the response. For example, if part of a request message is missing, I want to do something like the following:
When I try to do a console.log of the response, I see the status and message set properly but I do not see the validationErrors object in the response. Any suggestions on this are appreciated.