refactor: improve network error and allow verbose output (#36923)

This commit is contained in:
Yunlu Wen authored and GitHub committed 2026-06-02 10:43:40 +00:00
1 parent b682591c7a
commit f19679b217
28 files changed
+339 -231

No files matched your search

+2 -2
View File
@@ -5,7 +5,7 @@ import { join } from 'node:path'
import { testHttpClient } from '@test/fixtures/http-client'
import { jsonResponder, startStubServer } from '@test/fixtures/stub-server'
import { afterEach, beforeEach, describe, expect, it } from 'vitest'
import { isBaseError } from '@/errors/base'
import { isHttpClientError } from '@/errors/base'
import { FileUploadClient } from './file-upload.js'
const UPLOADED = {
@@ -70,7 +70,7 @@ describe('FileUploadClient.upload', () => {
stub = await startStubServer(cap => jsonResponder(413, { error: 'file too large' }, cap))
await expect(makeClient(stub.url).upload('app-1', filePath)).rejects.toSatisfy(
err => isBaseError(err) && err.httpStatus === 413,
err => isHttpClientError(err) && err.httpStatus === 413,
)
})
})