-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(prism-agent): infinite loop in proof presentation execution (#540)
* feat(prism-agent): add unique constraint to 'presentation_records.thid' * feat(prism-agent): handle DIDComm error responses appropriately and decrease retry counter * chore(prism-agent): run scalafmt
- Loading branch information
1 parent
6129baf
commit 6a26bb7
Showing
5 changed files
with
29 additions
and
18 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
...ie/src/main/resources/sql/pollux/V10__presentation_records_add_thid_unique_constraint.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE public.presentation_records ADD CONSTRAINT presentation_records_unique_thid UNIQUE (thid); |
4 changes: 0 additions & 4 deletions
4
...nt/service/server/src/main/scala/io/iohk/atala/agent/server/http/model/InvalidState.scala
This file was deleted.
Oops, something went wrong.
13 changes: 13 additions & 0 deletions
13
...nt/service/server/src/main/scala/io/iohk/atala/agent/server/jobs/BackgroundJobError.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package io.iohk.atala.agent.server.jobs | ||
|
||
import io.iohk.atala.mercury.HttpResponse | ||
|
||
sealed trait BackgroundJobError | ||
|
||
object BackgroundJobError { | ||
final case class InvalidState(cause: String) extends BackgroundJobError | ||
case object NotImplemented extends BackgroundJobError | ||
final case class ErrorResponseReceivedFromPeerAgent(response: HttpResponse) extends BackgroundJobError { | ||
override def toString: String = s"DIDComm sending error: [${response.status}] - ${response.bodyAsString}" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters