Skip to content

Commit 6578892

Browse files
committed
Fixup combined error
1 parent 0bfc4f6 commit 6578892

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/api-client-core/src/support.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,8 +316,8 @@ export const getNonNullableError = (response: Result & { fetching: boolean }, da
316316

317317
export const assertOperationSuccess = (response: OperationResult<any>, dataPath: string[], throwOnEmptyData = false) => {
318318
if (response.error) {
319-
if (response.error instanceof CombinedError && (response.error.networkError as any as Error[])?.length) {
320-
response.error.message = (response.error.networkError as any as Error[]).map((error) => "[Network] " + error.message).join("\n");
319+
if (response.error instanceof CombinedError && response.error.networkError?.message) {
320+
response.error.message = `[Network] ${response.error.networkError.message}`;
321321
}
322322
throw response.error;
323323
}

0 commit comments

Comments
 (0)