Problem
File: src/parallel/api.ts (line 44)
.pipe(Effect.orElseSucceed(() => "Failed to read error response"))
This recovers errors by returning a default value, which can mask parsing errors. The actual API error message becomes "Failed to read error response" even for real API errors.
Proposed Fix
Use Effect.catchAll to properly handle the error chain while preserving error details:
.pipe(Effect.catchAll((e) =>
Effect.succeed(`Failed to read error response: ${e.message}`)
))
Problem
File:
src/parallel/api.ts(line 44)This recovers errors by returning a default value, which can mask parsing errors. The actual API error message becomes "Failed to read error response" even for real API errors.
Proposed Fix
Use
Effect.catchAllto properly handle the error chain while preserving error details: