Is it possible to have custom error format? I need to have error responses in https://tools.ietf.org/html/rfc7807 (Problem Details for HTTP apis) format. This is possible for the actual handlers (GET, POST, ...) by catching errors and handling by myself but is not possible for validation errors (additionally validation stops at first error, it would be nice to validate the whole event and return all validation errors).
Maybe a property error.body which can be generated by the onError hook which will be used instead of generating the body object in processError is sufficient?
Is it possible to have custom error format? I need to have error responses in https://tools.ietf.org/html/rfc7807 (Problem Details for HTTP apis) format. This is possible for the actual handlers (GET, POST, ...) by catching errors and handling by myself but is not possible for validation errors (additionally validation stops at first error, it would be nice to validate the whole event and return all validation errors).
Maybe a property
error.body
which can be generated by the onError hook which will be used instead of generating the body object in processError is sufficient?