Spec points
- RSC15l: When a request times out after the connection is established (request-level timeout), the client should retry on a fallback host, just as it does for connection-level timeouts.
- RSC15l4: When a response includes a `Server: CloudFront` header with status >= 400, the client should treat it as a server error and retry on a fallback host.
Observed behaviour
RSC15l — Request timeout
Request-level timeouts propagate as errors without triggering fallback retry. Only connection-level errors (refused, DNS, timeout before connection) and HTTP 500–504 trigger fallback. The `shouldFallback` method does not consider request-level timeouts.
RSC15l4 — CloudFront header
`shouldFallback` in `http.ts` only checks for specific errno codes and HTTP 500–504 status codes. It does not inspect the `Server` response header. CloudFront errors with 4xx status codes are treated as non-retryable client errors.
Failing tests (2)
| Test |
Expected |
Actual |
| `RSC15l - request timeout triggers fallback` |
Retry on fallback host after request timeout |
Error thrown, no retry |
| `RSC15l4 - CloudFront Server header triggers fallback` |
Retry on fallback host on CloudFront 403 |
Error thrown, no retry |
Reproduction
```bash
RUN_DEVIATIONS=1 npx mocha --grep "RSC15l" test/uts/rest/fallback.test.ts
```
From PR #2191, branch `uts-rest`.
┆Issue is synchronized with this Jira Task by Unito
Spec points
Observed behaviour
RSC15l — Request timeout
Request-level timeouts propagate as errors without triggering fallback retry. Only connection-level errors (refused, DNS, timeout before connection) and HTTP 500–504 trigger fallback. The `shouldFallback` method does not consider request-level timeouts.
RSC15l4 — CloudFront header
`shouldFallback` in `http.ts` only checks for specific errno codes and HTTP 500–504 status codes. It does not inspect the `Server` response header. CloudFront errors with 4xx status codes are treated as non-retryable client errors.
Failing tests (2)
Reproduction
```bash
RUN_DEVIATIONS=1 npx mocha --grep "RSC15l" test/uts/rest/fallback.test.ts
```
From PR #2191, branch `uts-rest`.
┆Issue is synchronized with this Jira Task by Unito