New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(common): add error options object #10460
feat(common): add error options object #10460
Commits on Oct 25, 2022
-
feat(common): add error options object
add error options object to HttpException constructor to allow use of error cause along with custom message.
Commits on Oct 26, 2022
-
chore(common): add deprecated warning
add deprecated warning for HttpException class when using the first argument as the error cause.
-
feat(common): add error cause option
add error cause option to bad request exception.
-
refactor(common): change parameter assignment
change BadRequestException constructor parameters assignment to be clearer.
-
refactor(common): rearrange test blocks
rearrange HttpException spec file test blocks to increase readability, better separating tests by methods and contexts.
-
refactor(common): rename method parameter
rename HttpException createBody method parameter to better represent its usage. When this parameter is a string, it is used as a value to a 'message' key in the final object.
-
test(common): add http exception test
add test for HttpException's getResponse method when used with a built-in exception and providing the "description" parameter as part of the "options" object.
Commits on Oct 27, 2022
-
refactor(common): add description attribute
add description attribute to HttpExceptionOptions interface so we can reuse it among children exceptions.
-
-
feat(common): add error cause option
add error cause option to BadGatewayException.
-
refactor(common): extract description and options
extract functions that provide valid values for description and http exception options to the HttpException class
-
refactor(common): extract description and options
create HttpException#extractDescriptionAndOptionsFrom method to return both description and options at the same time
-
docs(common): add static method docs
add docs for HttpException.getHttpExceptionOptionsFrom explaining its intended usage.
-
test(common): test error cause option
test error cause option for BadRequestException.
-
test(common): aggregate exception tests
aggregate HttpException children classes tests in a single run to reduce the code duplication
-
feat(common): add error cause option
add error cause option to ConflictException.
-
docs(common): update exception docs
update HttpException children classes docs to reflect the changes to the "description" parameter
-
feat(common): add error cause option
add error cause option to ForbiddenException.
-
feat(common): add error cause option
add error cause option to GatewayTimeoutException.
-
feat(common): add error cause option
add error cause option to GoneException.
-
feat(common): add error cause option
add error cause option to HttpVersionNotSupportedException.
-
feat(common): add error cause option
add error cause option to ImATeapotException.
-
feat(common): add error cause option
add error cause option to InternalServerErrorException.
-
feat(common): add error cause option
add error cause option to MethodNotAllowedException.
-
feat(common): add error cause option
add error cause option to MisdirectedException.
-
feat(common): add error cause option
add error cause option to NotAcceptableException.
-
feat(common): add error cause option
add error cause option to NotFoundException.
-
feat(common): add error cause option
add error cause option to NotImplementedException.
-
feat(common): add error cause option
add error cause option to PayloadTooLargeException.
-
feat(common): add error cause option
add error cause option to PreconditionFailedException.
-
feat(common): add error cause option
add error cause option to RequestTimeoutException.
-
feat(common): add error cause option
add error cause option to ServiceUnavailableException.
-
feat(common): add error cause option
add error cause option to UnauthorizedException.
-
feat(common): add error cause option
add error cause option to UnprocessableEntityException.
-
feat(common): add error cause option
add error cause option to UnsupportedMediaTypeException.
-
test(common): reuse error cause variable
reuse errorCause variable in HttpException test
-
test(common): add http exception tests
add tests for all HttpException children classes and fix NotAcceptableException wrong status code.
-
test(common): add http exception tests
add "getStatus" tests for all HttpException children classes