Skip to content

Commit

Permalink
patch empty response
Browse files Browse the repository at this point in the history
  • Loading branch information
EdamAme-x committed Dec 10, 2024
1 parent fa42426 commit 45e40c5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/linejs/client/clients/base-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1629,6 +1629,12 @@ export class BaseClient extends TypedEventEmitter<ClientEvents> {
}
const body = await response.arrayBuffer();
const parsedBody = new Uint8Array(body);

// patch empty response
if (Object.keys(parsedBody).length === 0) {
return { value: null, e: null, _info: null };
}

this.log("fetchRecv", {
thriftMethodName: methodName,
method: "thrift",
Expand Down

0 comments on commit 45e40c5

Please sign in to comment.