swagger-express-middleware icon indicating copy to clipboard operation
swagger-express-middleware copied to clipboard

Custom Error Formatting

Open BebeSparkelSparkel opened this issue 6 years ago • 1 comments

I am trying to customize the error messages received by the error handler because the provided message example is too long for my use case

The "dob" query parameter is invalid ("catafd") \n"catafd" is not a properly-formatted date

When working with the validator *Joi * the error handler received an object with all the properties of the error. Is it possible to send the object to the handler that the Error instance is created from instead of a pre-formatted Error?

BebeSparkelSparkel avatar Apr 24 '18 13:04 BebeSparkelSparkel

This looks like a duplicate of https://github.com/APIDevTools/swagger-express-middleware/issues/79

cdimascio avatar Nov 18 '18 04:11 cdimascio