This commit is contained in:
Sebastian Herrlinger
2026-03-24 21:29:42 +01:00
parent b7a06e1939
commit e89f5084d3
73 changed files with 7968 additions and 641 deletions
+2 -13
View File
@@ -1,4 +1,5 @@
import { ConfigMarkdown } from "@/config/markdown"
import { errorFormat } from "@/util/error"
import { Config } from "../config/config"
import { MCP } from "../mcp"
import { Provider } from "../provider/provider"
@@ -41,17 +42,5 @@ export function FormatError(input: unknown) {
}
export function FormatUnknownError(input: unknown): string {
if (input instanceof Error) {
return input.stack ?? `${input.name}: ${input.message}`
}
if (typeof input === "object" && input !== null) {
try {
return JSON.stringify(input, null, 2)
} catch {
return "Unexpected error (unserializable)"
}
}
return String(input)
return errorFormat(input)
}