fix: use mapError instead of orDie for context snapshot decoding (#30905)

Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com>
This commit is contained in:
weiconghe 2026-06-05 20:37:00 +08:00 committed by GitHub
commit a261b55e43
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 46 additions and 4 deletions

View file

@ -6,3 +6,15 @@ export class MessageDecodeError extends Schema.TaggedErrorClass<MessageDecodeErr
sessionID: SessionSchema.ID,
messageID: SessionMessage.ID,
}) {}
export class ContextSnapshotDecodeError extends Schema.TaggedErrorClass<ContextSnapshotDecodeError>()(
"Session.ContextSnapshotDecodeError",
{
sessionID: SessionSchema.ID,
details: Schema.String,
},
) {
override get message() {
return `Failed to decode context snapshot for session ${this.sessionID}: ${this.details}`
}
}