Spec points
- RSA17c: `revokeTokens()` should normalise the server response into `{successCount, failureCount, results}`.
- BAR2, BGF2, RSC24: When the server returns HTTP 400 with `{error, batchResponse}` for mixed or all-failure batch presence results, the SDK should normalise the response into `{successCount, failureCount, results}`.
Observed behaviour
Both `batchPresence()` and `revokeTokens()` use `Resource.get()` / `Resource.post()` with `throwError=true`. Any HTTP 400 response sets `result.err`, which is thrown. The `batchResponse` data containing per-target success/failure results is discarded.
For `revokeTokens()`, the server response body is also passed through as-is rather than normalised.
Failing tests (7)
| Test |
File |
Issue |
| `RSA17c_2 - mixed result normalised` |
`revoke_tokens.test.ts` |
Throws on HTTP 400 instead of returning results |
| `RSA17c_3 - all failure normalised` |
`revoke_tokens.test.ts` |
Same |
| `TRF2_1 - failure details in results` |
`revoke_tokens.test.ts` |
Same |
| `BAR2_1 - mixed results normalised` |
`batch_presence.test.ts` |
Throws on HTTP 400 |
| `BAR2_3 - all failure normalised` |
`batch_presence.test.ts` |
Same |
| `BGF2_1 - failure result normalised with error details` |
`batch_presence.test.ts` |
Same |
| `RSC24_Mixed_1 - mixed results normalised` |
`batch_presence.test.ts` |
Same |
Reproduction
```bash
RUN_DEVIATIONS=1 npx mocha --grep "RSA17c_2|RSA17c_3|TRF2_1" test/uts/rest/auth/revoke_tokens.test.ts
RUN_DEVIATIONS=1 npx mocha --grep "BAR2_1|BAR2_3|BGF2_1|RSC24_Mixed" test/uts/rest/batch_presence.test.ts
```
From PR #2191, branch `uts-rest`.
┆Issue is synchronized with this Jira Task by Unito
Spec points
Observed behaviour
Both `batchPresence()` and `revokeTokens()` use `Resource.get()` / `Resource.post()` with `throwError=true`. Any HTTP 400 response sets `result.err`, which is thrown. The `batchResponse` data containing per-target success/failure results is discarded.
For `revokeTokens()`, the server response body is also passed through as-is rather than normalised.
Failing tests (7)
Reproduction
```bash
RUN_DEVIATIONS=1 npx mocha --grep "RSA17c_2|RSA17c_3|TRF2_1" test/uts/rest/auth/revoke_tokens.test.ts
RUN_DEVIATIONS=1 npx mocha --grep "BAR2_1|BAR2_3|BGF2_1|RSC24_Mixed" test/uts/rest/batch_presence.test.ts
```
From PR #2191, branch `uts-rest`.
┆Issue is synchronized with this Jira Task by Unito