Skip to content
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

Commits on Oct 25, 2022

  1. feat(common): add error options object

    add error options object to HttpException constructor to allow use of error cause along with custom message.
    thiagomini committed Oct 25, 2022
    Copy the full SHA
    b5fe06d View commit details
    Browse the repository at this point in the history

Commits on Oct 26, 2022

  1. chore(common): add deprecated warning

    add deprecated warning for HttpException class when using the first argument as the error cause.
    thiagomini committed Oct 26, 2022
    Copy the full SHA
    f5edb0f View commit details
    Browse the repository at this point in the history
  2. feat(common): add error cause option

    add error cause option to bad request exception.
    thiagomini committed Oct 26, 2022
    Copy the full SHA
    587fbae View commit details
    Browse the repository at this point in the history
  3. refactor(common): change parameter assignment

    change BadRequestException constructor parameters assignment to be clearer.
    thiagomini committed Oct 26, 2022
    Copy the full SHA
    071c4c5 View commit details
    Browse the repository at this point in the history
  4. refactor(common): rearrange test blocks

    rearrange HttpException spec file test blocks to increase readability, better separating tests by methods and contexts.
    thiagomini committed Oct 26, 2022
    Copy the full SHA
    d63b6df View commit details
    Browse the repository at this point in the history
  5. 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.
    thiagomini committed Oct 26, 2022
    Copy the full SHA
    7e763fa View commit details
    Browse the repository at this point in the history
  6. 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.
    thiagomini committed Oct 26, 2022
    Copy the full SHA
    1a8ada5 View commit details
    Browse the repository at this point in the history

Commits on Oct 27, 2022

  1. refactor(common): add description attribute

    add description attribute to HttpExceptionOptions interface so we can reuse it among children exceptions.
    thiagomini committed Oct 27, 2022
    Copy the full SHA
    4ded779 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    c5c818e View commit details
    Browse the repository at this point in the history
  3. feat(common): add error cause option

    add error cause option to BadGatewayException.
    thiagomini committed Oct 27, 2022
    Copy the full SHA
    60cb953 View commit details
    Browse the repository at this point in the history
  4. refactor(common): extract description and options

    extract functions that provide valid values for description and http exception options to the HttpException class
    thiagomini committed Oct 27, 2022
    Copy the full SHA
    7a71035 View commit details
    Browse the repository at this point in the history
  5. refactor(common): extract description and options

    create HttpException#extractDescriptionAndOptionsFrom method to return both description and options at the same time
    thiagomini committed Oct 27, 2022
    Copy the full SHA
    a4a8557 View commit details
    Browse the repository at this point in the history
  6. docs(common): add static method docs

    add docs for HttpException.getHttpExceptionOptionsFrom explaining its intended usage.
    thiagomini committed Oct 27, 2022
    Copy the full SHA
    5a186af View commit details
    Browse the repository at this point in the history
  7. test(common): test error cause option

    test error cause option for BadRequestException.
    thiagomini committed Oct 27, 2022
    Copy the full SHA
    86c5084 View commit details
    Browse the repository at this point in the history
  8. test(common): aggregate exception tests

    aggregate HttpException children classes tests in a single run to reduce the code duplication
    thiagomini committed Oct 27, 2022
    Copy the full SHA
    472c711 View commit details
    Browse the repository at this point in the history
  9. feat(common): add error cause option

    add error cause option to ConflictException.
    thiagomini committed Oct 27, 2022
    Copy the full SHA
    88ac6aa View commit details
    Browse the repository at this point in the history
  10. docs(common): update exception docs

    update HttpException children classes docs to reflect the changes to the "description" parameter
    thiagomini committed Oct 27, 2022
    Copy the full SHA
    1dff9c0 View commit details
    Browse the repository at this point in the history
  11. feat(common): add error cause option

    add error cause option to ForbiddenException.
    thiagomini committed Oct 27, 2022
    Copy the full SHA
    c3ced1d View commit details
    Browse the repository at this point in the history
  12. feat(common): add error cause option

    add error cause option to GatewayTimeoutException.
    thiagomini committed Oct 27, 2022
    Copy the full SHA
    f629dc1 View commit details
    Browse the repository at this point in the history
  13. feat(common): add error cause option

    add error cause option to GoneException.
    thiagomini committed Oct 27, 2022
    Copy the full SHA
    bd7daf1 View commit details
    Browse the repository at this point in the history
  14. feat(common): add error cause option

    add error cause option to HttpVersionNotSupportedException.
    thiagomini committed Oct 27, 2022
    Copy the full SHA
    0328a5c View commit details
    Browse the repository at this point in the history
  15. feat(common): add error cause option

    add error cause option to ImATeapotException.
    thiagomini committed Oct 27, 2022
    Copy the full SHA
    11d2763 View commit details
    Browse the repository at this point in the history
  16. feat(common): add error cause option

    add error cause option to InternalServerErrorException.
    thiagomini committed Oct 27, 2022
    Copy the full SHA
    b815143 View commit details
    Browse the repository at this point in the history
  17. feat(common): add error cause option

    add error cause option to MethodNotAllowedException.
    thiagomini committed Oct 27, 2022
    Copy the full SHA
    789e99c View commit details
    Browse the repository at this point in the history
  18. feat(common): add error cause option

    add error cause option to MisdirectedException.
    thiagomini committed Oct 27, 2022
    Copy the full SHA
    cd44ff3 View commit details
    Browse the repository at this point in the history
  19. feat(common): add error cause option

    add error cause option to NotAcceptableException.
    thiagomini committed Oct 27, 2022
    Copy the full SHA
    3a10258 View commit details
    Browse the repository at this point in the history
  20. feat(common): add error cause option

    add error cause option to NotFoundException.
    thiagomini committed Oct 27, 2022
    Copy the full SHA
    d569aaa View commit details
    Browse the repository at this point in the history
  21. feat(common): add error cause option

    add error cause option to NotImplementedException.
    thiagomini committed Oct 27, 2022
    Copy the full SHA
    2416df6 View commit details
    Browse the repository at this point in the history
  22. feat(common): add error cause option

    add error cause option to PayloadTooLargeException.
    thiagomini committed Oct 27, 2022
    Copy the full SHA
    dfc28fc View commit details
    Browse the repository at this point in the history
  23. feat(common): add error cause option

    add error cause option to PreconditionFailedException.
    thiagomini committed Oct 27, 2022
    Copy the full SHA
    d40ebd1 View commit details
    Browse the repository at this point in the history
  24. feat(common): add error cause option

    add error cause option to RequestTimeoutException.
    thiagomini committed Oct 27, 2022
    Copy the full SHA
    5031f41 View commit details
    Browse the repository at this point in the history
  25. feat(common): add error cause option

    add error cause option to ServiceUnavailableException.
    thiagomini committed Oct 27, 2022
    Copy the full SHA
    e8abd9a View commit details
    Browse the repository at this point in the history
  26. feat(common): add error cause option

    add error cause option to UnauthorizedException.
    thiagomini committed Oct 27, 2022
    Copy the full SHA
    f62acac View commit details
    Browse the repository at this point in the history
  27. feat(common): add error cause option

    add error cause option to UnprocessableEntityException.
    thiagomini committed Oct 27, 2022
    Copy the full SHA
    b4aca5d View commit details
    Browse the repository at this point in the history
  28. feat(common): add error cause option

    add error cause option to UnsupportedMediaTypeException.
    thiagomini committed Oct 27, 2022
    Copy the full SHA
    379b82c View commit details
    Browse the repository at this point in the history
  29. test(common): reuse error cause variable

    reuse errorCause variable in HttpException test
    thiagomini committed Oct 27, 2022
    Copy the full SHA
    971ce5f View commit details
    Browse the repository at this point in the history
  30. test(common): add http exception tests

    add tests for all HttpException children classes and fix NotAcceptableException wrong status code.
    thiagomini committed Oct 27, 2022
    Copy the full SHA
    45b6cc1 View commit details
    Browse the repository at this point in the history
  31. test(common): add http exception tests

    add "getStatus" tests for all HttpException children classes
    thiagomini committed Oct 27, 2022
    Copy the full SHA
    ab881e3 View commit details
    Browse the repository at this point in the history