-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Description
If you are using Restify, the normal error have this schema example:
{
"code": "ResourceNotFound",
"message": "/v1/test does not exist"
}
Have code and message.
But in restify-validator you can get something like this:
{
"status": "validation failed",
"errors": [
{
"field": "amount",
"code": "INVALID",
"message": "Invalid number"
}
]
}
As you can see, no there are any first level code param, and there are a status param. That is the first time that I see.
Maybe will be maintain the same schema:
{
"code": "BadRequest",
"message": "Validation failed",
"errors": [
{
"field": "amount",
"code": "INVALID",
"message": "Invalid number"
}
]
}
The main idea is maintain a similar schema of Restify
Metadata
Metadata
Assignees
Labels
No labels