Skip to content

Commit f351d18

Browse files
author
SentienceDEV
committed
include network error
1 parent bee6025 commit f351d18

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/snapshot.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,9 +424,10 @@ async function snapshotViaApi(
424424
if (e instanceof SnapshotGatewayError) {
425425
throw e;
426426
}
427+
const errType = e instanceof Error ? e.name : typeof e;
427428
const errMsg = e instanceof Error ? `${e.name}: ${e.message}` : String(e);
428429
throw new SnapshotGatewayError(
429-
`Server-side snapshot API failed: url=${gatewayUrl} err=${SnapshotGatewayError.snip(errMsg, 220)}. Try using use_api: false to use local extension instead.`,
430+
`Server-side snapshot API failed: url=${gatewayUrl} err_type=${SnapshotGatewayError.snip(errType, 80)} err=${SnapshotGatewayError.snip(errMsg, 220)}. Try using use_api: false to use local extension instead.`,
430431
{ url: gatewayUrl, cause: e }
431432
);
432433
}

0 commit comments

Comments
 (0)