diff --git a/ledger/participant-state/kvutils/src/main/scala/com/daml/ledger/participant/state/kvutils/errors/KVErrors.scala b/ledger/participant-state/kvutils/src/main/scala/com/daml/ledger/participant/state/kvutils/errors/KVErrors.scala index 28204161a02b..441680ec2398 100644 --- a/ledger/participant-state/kvutils/src/main/scala/com/daml/ledger/participant/state/kvutils/errors/KVErrors.scala +++ b/ledger/participant-state/kvutils/src/main/scala/com/daml/ledger/participant/state/kvutils/errors/KVErrors.scala @@ -207,5 +207,20 @@ object KVErrors extends ErrorGroup()(ErrorGroups.rootErrorClass) { super.context ++ metadata // Only in logs as the category is security sensitive } } + + @Explanation("An unexpected error occurred while submitting a command to the ledger.") + @Resolution("Contact support.") + object SubmissionFailed + extends ErrorCode( + id = "SUBMISSION_FAILED", + ErrorCategory.SystemInternalAssumptionViolated, + ) { + case class Reject( + details: String + )(implicit loggingContext: ContextualizedErrorLogger) + extends KVLoggingTransactionErrorImpl( + cause = s"Submission failure: $details" + ) + } } }