mengw15 opened a new pull request, #5461: URL: https://github.com/apache/texera/pull/5461
### What changes were proposed in this PR? Adds a unit spec for `BlobErrorHttpInterceptor`, which previously had none. Covers every branch of `intercept()`: - success → passed through unchanged - re-thrown unchanged for: a non-`HttpErrorResponse` error, an `HttpErrorResponse` whose `error` is not a `Blob`, and a `Blob` error whose type is not `application/json` - an `application/json` `Blob` error → parsed into a structured `HttpErrorResponse` with the original `status` / `statusText` / `url` preserved - malformed JSON in the blob, or a `FileReader` failure → falls back to the original error The interceptor is driven directly with a stub `HttpHandler` rather than through `HttpClient`/`HTTP_INTERCEPTORS`. Two branches — a non-`HttpErrorResponse` error and a `FileReader` failure — cannot be produced through `HttpClient` (it always wraps errors as `HttpErrorResponse`, and a readable `Blob` never triggers `FileReader.onerror`), so direct invocation is the only way to cover them. Follows `frontend/TESTING.md` (Vitest). ### Any related issues, documentation, discussions? Closes #5455. ### How was this PR tested? `yarn test --include='**/blob-error-http-interceptor.service.spec.ts'` → 7 passed. `prettier --check` clean. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (claude-opus-4-7) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
