Skip to content

Commit dfd8e4d

Browse files
PiquelChipsclaude
andcommitted
refactor(sdk): drop the TypeScript client's empty-body case, which only revocation reached
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 8cbb6c0 commit dfd8e4d

2 files changed

Lines changed: 1 addition & 7 deletions

File tree

‎packages/auth/src/client.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,7 @@ export class Client {
367367
);
368368
let body: unknown;
369369
try {
370-
// An empty body, as the revocation endpoint sends, reads as `null`.
371-
body = reply.empty ? null : reply.json();
370+
body = reply.json();
372371
} catch (error) {
373372
throw unexpected(error);
374373
}

‎packages/auth/src/http.ts‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@ export class Reply {
3232
this.maxAge = maxAge === undefined ? undefined : Number(maxAge);
3333
}
3434

35-
/** Whether the body is empty. */
36-
get empty(): boolean {
37-
return this.#body.length === 0;
38-
}
39-
4035
/** Requires `200 OK`, as document endpoints answer. */
4136
ok(): this {
4237
if (this.status === 200) return this;

0 commit comments

Comments
 (0)