Skip to content

Commit

Permalink
fix(prism-agent): Update Mercury Connect Pollux (#382)
Browse files Browse the repository at this point in the history
  • Loading branch information
FabioPinheiro authored Feb 17, 2023
1 parent f291860 commit b7f02ac
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions prism-agent/service/project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ object Dependencies {
val akka = "2.6.20"
val akkaHttp = "10.2.9"
val castor = "0.8.0"
val pollux = "0.27.0"
val connect = "0.10.0"
val pollux = "0.28.1"
val connect = "0.10.1"
val bouncyCastle = "1.70"
val logback = "1.4.5"
val mercury = "0.18.0"
val mercury = "0.19.0"
val zioJson = "0.3.0"
val tapir = "1.2.3"
val flyway = "9.8.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ object Modules {
.catchAll { case ex: IOException => ZIO.fail(ex) }
// Accept the ConnectionRequest
_ <- connectionService
.acceptConnectionRequest(maybeRecord.get.id) // TODO: get
.acceptConnectionRequest(maybeRecord.id)
.catchSome { case ConnectionServiceError.RepositoryError(cause) =>
ZIO.logError(cause.getMessage()) *>
ZIO.fail(cause)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ class ConnectionsManagementApiServiceImpl(
.mapError(HttpServiceError.DomainError[ConnectionServiceError].apply(_).toOAS)
} yield record

onZioSuccess(result.map(_.map(_.toOAS)).either) {
case Left(error) => complete(error.status -> error)
case Right(Some(result)) => acceptConnectionInvitation200(result)
case Right(None) => acceptConnectionInvitation500(notFoundErrorResponse(Some("Connection record not found")))
onZioSuccess(result.map(_.toOAS).either) {
case Left(error) => complete(error.status -> error)
case Right(result) => acceptConnectionInvitation200(result)
// case Right(None) => acceptConnectionInvitation500(notFoundErrorResponse(Some("Connection record not found"))) // TODO this is now Left
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ class IssueCredentialsProtocolApiServiceImpl(
.mapError(HttpServiceError.DomainError[CredentialServiceError].apply)
} yield outcome

onZioSuccess(result.mapBoth(_.toOAS, _.map(_.toOAS)).either) {
case Left(error) => complete(error.status -> error)
case Right(Some(result)) => acceptCredentialOffer200(result)
case Right(None) => getCredentialRecord404(notFoundErrorResponse(Some("Issue credential record not found")))
onZioSuccess(result.mapBoth(_.toOAS, _.toOAS).either) {
case Left(error) => complete(error.status -> error)
case Right(result) => acceptCredentialOffer200(result)
// case Right(None) => getCredentialRecord404(notFoundErrorResponse(Some("Issue credential record not found"))) // TODO this is now Left
}
}

Expand All @@ -144,10 +144,10 @@ class IssueCredentialsProtocolApiServiceImpl(
.mapError(HttpServiceError.DomainError[CredentialServiceError].apply)
} yield outcome

onZioSuccess(result.mapBoth(_.toOAS, _.map(_.toOAS)).either) {
case Left(error) => complete(error.status -> error)
case Right(Some(result)) => issueCredential200(result)
case Right(None) => getCredentialRecord404(notFoundErrorResponse(Some("Issue credential record not found")))
onZioSuccess(result.mapBoth(_.toOAS, _.toOAS).either) {
case Left(error) => complete(error.status -> error)
case Right(result) => issueCredential200(result)
// case Right(None) => getCredentialRecord404(notFoundErrorResponse(Some("Issue credential record not found"))) // TODO this is now Left
}
}

Expand Down

0 comments on commit b7f02ac

Please sign in to comment.