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

Causing Stack Trace Server Errors Get Lost #127

Closed
Weltraumschaf opened this issue Jul 12, 2024 · 0 comments
Closed

Causing Stack Trace Server Errors Get Lost #127

Weltraumschaf opened this issue Jul 12, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@Weltraumschaf
Copy link
Member

In very old implementations all causingexceptions were simply ignored. I've fixed that some time ago that causing errors are passed to our custom exception as cause.

But I chosen the type of catched exceptions to narrow: Instead of HttpClientErrorException we should catch all possible runtime exceptions from the REST client with RestClientException.

@Weltraumschaf Weltraumschaf added the bug Something isn't working label Jul 12, 2024
@Weltraumschaf Weltraumschaf self-assigned this Jul 12, 2024
@Weltraumschaf Weltraumschaf moved this from Backlog to In Progress in secureCodeBox v4 Jul 12, 2024
Weltraumschaf added a commit to Weltraumschaf/defectdojo-client-java that referenced this issue Jul 12, 2024
…quests

Two Problems:
1. We do not pass consequently the causing exception to our own custom
   exception.
2. We do not catch all possible REST client runtime exceptions.

Fixed by consequent logging and passing ofthe origin exception as
cause of our own excpetion. Also catching a more generic exception
type totach all possible errors.

Signed-off-by: Sven Strittmatter <sven.strittmatter@iteratec.com>
Weltraumschaf added a commit to Weltraumschaf/defectdojo-client-java that referenced this issue Jul 26, 2024
The conatenation will be done always, also if debug level is not
logged. So we should alwyas use parameterized log statements.

Signed-off-by: Sven Strittmatter <sven.strittmatter@iteratec.com>
Weltraumschaf added a commit to Weltraumschaf/defectdojo-client-java that referenced this issue Jul 26, 2024
…P Methods

In previous commits only GET requests were covered with proper
exception handling.

This adds rethrow of our own custom exception with the originating
error as cause, like already implemented for GET requests.

Signed-off-by: Sven Strittmatter <sven.strittmatter@iteratec.com>
Weltraumschaf added a commit that referenced this issue Jul 27, 2024
Two Problems:
1. We do not pass consequently the causing exception to our own custom
   exception.
2. We do not catch all possible REST client runtime exceptions.

Fixed by consequent logging and passing ofthe origin exception as
cause of our own excpetion. Also catching a more generic exception
type totach all possible errors.

Signed-off-by: Sven Strittmatter <sven.strittmatter@iteratec.com>
Weltraumschaf added a commit that referenced this issue Jul 27, 2024
The conatenation will be done always, also if debug level is not
logged. So we should alwyas use parameterized log statements.

Signed-off-by: Sven Strittmatter <sven.strittmatter@iteratec.com>
Weltraumschaf added a commit that referenced this issue Jul 27, 2024
In previous commits only GET requests were covered with proper
exception handling.

This adds rethrow of our own custom exception with the originating
error as cause, like already implemented for GET requests.

Signed-off-by: Sven Strittmatter <sven.strittmatter@iteratec.com>
@github-project-automation github-project-automation bot moved this from In Progress to Done in secureCodeBox v4 Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

1 participant