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: Added DidSubject to report problem when not enrolled #111

Merged
merged 1 commit into from
Sep 7, 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
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,15 @@ object ForwardMessageExecuter
from = agent.id,
pthid = plaintextMessage.id,
piuri = plaintextMessage.`type`,
didNotEnrolled = m.next,
)
case None =>
Problems.notEnroledError(
to = None,
from = agent.id,
pthid = plaintextMessage.id,
piuri = plaintextMessage.`type`,
didNotEnrolled = m.next,
)
}
} yield Reply(problem.toPlaintextMessage)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ object PickupExecuter
to = Some(m.from.asTO),
pthid = m.id, // TODO CHECK pthid
piuri = m.piuri,
didNotEnrolled = didRequestingMessages.asFROM.toDIDSubject,
)
.toPlaintextMessage
case Some(didAccount) =>
Expand Down Expand Up @@ -106,6 +107,7 @@ object PickupExecuter
to = Some(m.from.asTO),
pthid = m.id, // TODO CHECK pthid
piuri = m.piuri,
didNotEnrolled = didRequestingMessages.asFROM.toDIDSubject,
)
.toPlaintextMessage
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ object Problems {
from: FROM,
pthid: MsgID,
piuri: PIURI,
didNotEnrolled: DIDSubject
) = ProblemReport(
// id: MsgID = MsgID(),
to = to.toSet,
Expand All @@ -107,7 +108,7 @@ object Problems {
ack = None,
code = ProblemCode.ErroFail("req", "not_enroll"),
comment = Some("The DID '{1}' is not enroled."),
args = Some(to.map(_.value).toSeq),
args = Some(Seq(didNotEnrolled.did)),
escalate_to = email,
)

Expand Down
Loading