Exception handling in Caching Service
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 92
- Forks
- 81
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 46
Description
This issue is based on #4408
Almost all exception thrown in the Caching service uses class StorageException. This exception means a state or it is used just to wrap original exception. All the exception are handled in the controller and there is no ControllerAdvice bean. All this complicates the control of program. It is very dificult to decide what error message should be returned. It the PR #4408 is possible to look what is the temporary solution of this issue. Anyway, the aim of this issue is:
- separate exception handling to a new class (ControllerAdvice)
- create a structure of exception that allows to easily detect reason of failure
- review the whole Caching service and caller part in the Gateway on how exception are handled
- write multiple tests to verify if the proper response code was returned
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the temporary solution in PR #4408 and trace exception handling through the Caching service and its caller in the Gateway. Define the ControllerAdvice and exception structure from the existing behavior, then add tests covering the response codes for the identified failure reasons.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100