sendError method
Sends error serialized as ErrorDescription object and appropriate HTTP status code. If status code is not defined, it uses 500 status code.
req
a HTTP request object.res
a HTTP response object.error
an error object to be sent.
Sends error serialized as ErrorDescription object and appropriate HTTP status code. If status code is not defined, it uses 500 status code.
req
a HTTP request object.res
a HTTP response object.error
an error object to be sent.