mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-03 15:43:45 +00:00
fix(session): preserve tagged error messages (#18165)
This commit is contained in:
@@ -956,7 +956,7 @@ export namespace MessageV2 {
|
||||
{ cause: e },
|
||||
).toObject()
|
||||
case e instanceof Error:
|
||||
return new NamedError.Unknown({ message: e.toString() }, { cause: e }).toObject()
|
||||
return new NamedError.Unknown({ message: e instanceof Error ? e.message : String(e) }, { cause: e }).toObject()
|
||||
default:
|
||||
try {
|
||||
const parsed = ProviderError.parseStreamError(e)
|
||||
|
||||
Reference in New Issue
Block a user