fix(tui): fail fast on invalid session startup (#23837)
This commit is contained in:
committed by
Aiden Cline
parent
d884ab73d5
commit
6196b81e0a
@@ -26,6 +26,15 @@ export function errorMessage(error: unknown): string {
|
||||
return error.message
|
||||
}
|
||||
|
||||
if (
|
||||
isRecord(error) &&
|
||||
isRecord(error.data) &&
|
||||
typeof error.data.message === "string" &&
|
||||
error.data.message
|
||||
) {
|
||||
return error.data.message
|
||||
}
|
||||
|
||||
const text = String(error)
|
||||
if (text && text !== "[object Object]") return text
|
||||
|
||||
|
||||
Reference in New Issue
Block a user