hyperledger / identus-cloud-agent

Identus Cloud Agent
https://docs.atalaprism.io/
Apache License 2.0
72 stars 18 forks source link

feat: Handle Error in Background Jobs - Improve the way we store errors and defects in DB #1218

Closed FabioPinheiro closed 3 days ago

FabioPinheiro commented 1 week ago

Description:

ATL-6931 Note the branch name is wrong

Checklist:

github-actions[bot] commented 1 week ago

Unit Test Results

 96 files  ±0   96 suites  ±0   21m 52s :stopwatch: -35s 826 tests ±0  818 :white_check_mark: ±0  8 :zzz: ±0  0 :x: ±0  833 runs  ±0  825 :white_check_mark: ±0  8 :zzz: ±0  0 :x: ±0 

Results for commit 26ae6a0e. ± Comparison against base commit e5e34113.

:recycle: This comment has been updated with latest results.

github-actions[bot] commented 6 days ago

Integration Test Results

16 files  ±0  16 suites  ±0   2s :stopwatch: ±0s 34 tests ±0  34 :white_check_mark: ±0  0 :zzz: ±0  0 :x: ±0  59 runs  ±0  59 :white_check_mark: ±0  0 :zzz: ±0  0 :x: ±0 

Results for commit 26ae6a0e. ± Comparison against base commit e5e34113.

:recycle: This comment has been updated with latest results.

FabioPinheiro commented 6 days ago

@bvoiturier can you review?

FabioPinheiro commented 5 days ago

Hey @CryptoKnightIOG do you want to have a look at this PR. Since you are doing ATL-6933:

The ErrorResponse stored in DB should then be exposed through the REST API for later retrieval by the user. Those should be returned as part of the connect, issue, and present flow records.

In shared/core/src/main/scala/org/hyperledger/identus/shared/models/Failure.scala I'm adding a case class FailureInfo just to read the error from the DB. We don't have access to the error type (because we do not encode that) but we have all the necessary information to inform the user. What do you think?