Skip to content

Commit 9ff3950

Browse files
committed
tweak: additional error msg parsing case
1 parent f96c181 commit 9ff3950

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/opencode/src/session/message-v2.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,7 @@ export namespace MessageV2 {
754754
try {
755755
const body = JSON.parse(e.responseBody)
756756
// try to extract common error message fields
757-
const errMsg = body.message || body.error
757+
const errMsg = body.message || body.error || body.error?.message
758758
if (errMsg && typeof errMsg === "string") {
759759
return `${msg}: ${errMsg}`
760760
}

0 commit comments

Comments
 (0)