Skip to content

Commit

Permalink
fix(prism-agent): Fix for ATL-3624 (#430)
Browse files Browse the repository at this point in the history
  • Loading branch information
FabioPinheiro authored Mar 9, 2023
1 parent dcece09 commit 02fe4d8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion prism-agent/service/project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ object Dependencies {
val akka = "2.6.20"
val akkaHttp = "10.2.9"
val castor = "0.8.1"
val pollux = "0.35.2"
val pollux = "0.39.0"
val connect = "0.11.0"
val bouncyCastle = "1.70"
val logback = "1.4.5"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ object Modules {
}

val issueCredentialDidCommExchangesJob: RIO[
AppConfig & DidOps & DIDResolver & JwtDidResolver & HttpClient & CredentialService & DIDService & ManagedDIDService,
AppConfig & DidOps & DIDResolver & JwtDidResolver & HttpClient & CredentialService & DIDService &
ManagedDIDService & PresentationService,
Unit
] =
for {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ object BackgroundJobs {
private[this] def performExchange(
record: IssueCredentialRecord
): URIO[
DidOps & DIDResolver & JwtDidResolver & HttpClient & CredentialService & DIDService & ManagedDIDService,
DidOps & DIDResolver & JwtDidResolver & HttpClient & CredentialService & DIDService & ManagedDIDService &
PresentationService,
Unit
] = {
import IssueCredentialRecord._
Expand Down Expand Up @@ -325,6 +326,16 @@ object BackgroundJobs {
} yield ()

aux
.tapError(ex =>
for {
presentationService <- ZIO.service[PresentationService]
_ <- presentationService
.markFailure(record.id, Some(ex.toString))
.catchAll(throwable =>
ZIO.logErrorCause(s"Issue Credential fail to markFailure: ${record.id}", Cause.fail(throwable))
)
} yield ()
)
.catchAll {
case ex: MercuryException =>
ZIO.logErrorCause(s"DIDComm communication error processing record: ${record.id}", Cause.fail(ex))
Expand All @@ -336,6 +347,7 @@ object BackgroundJobs {
.catchAllDefect { case throwable =>
ZIO.logErrorCause(s"Issue Credential protocol defect processing record: ${record.id}", Cause.fail(throwable))
}

}

// TODO: Improvements needed here:
Expand Down

0 comments on commit 02fe4d8

Please sign in to comment.