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

fix(prism-agent): Fix for ATL-3624 #430

Merged
merged 1 commit into from
Mar 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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