Skip to content

Commit

Permalink
Changed return to match shape of error. (#2744)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelUnkey authored Dec 12, 2024
1 parent 5a95fcd commit cc1c90c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/api/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,9 @@ export class Unkey {
}

if (res) {
const { code, message, docs, requestId } = (await res.json()) as ErrorResponse["error"];
return {
error: { code, message, docs, requestId },
};
return (await res.json()) as ErrorResponse;
}

return {
error: {
// @ts-ignore
Expand Down

0 comments on commit cc1c90c

Please sign in to comment.