Skip to content

Commit

Permalink
test: see if we can propogate down the reason
Browse files Browse the repository at this point in the history
  • Loading branch information
MikePresman committed Dec 5, 2023
1 parent 765910a commit ff665c7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/api-client-core/src/GadgetConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -502,8 +502,9 @@ export class GadgetConnection {

const retryOnClose = (event: unknown) => {
if (isCloseEvent(event)) {
console.log({ event }, "this is the event");
if (event.code == 4429) {
wrappedReject(new GadgetTooManyRequestsError("Too many requests sent to the Gadget API"));
wrappedReject(new GadgetTooManyRequestsError(event.reason));
resetListeners();
return;
}
Expand Down

0 comments on commit ff665c7

Please sign in to comment.