Skip to content

Commit

Permalink
Remove redirect error logging
Browse files Browse the repository at this point in the history
  • Loading branch information
pontusab committed Oct 30, 2024
1 parent 806508e commit 1464563
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions apps/dashboard/src/actions/institutions/create-gocardless-link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,17 @@ export const createGoCardLessLinkAction = authActionClient

return redirect(data.link);
} catch (error) {
analytics.track({
event: LogEvents.GoCardLessLinkFailed.name,
institutionId,
availableHistory,
redirectBase,
});
// Ignore NEXT_REDIRECT error in analytics
if (error instanceof Error && error.message !== "NEXT_REDIRECT") {
analytics.track({
event: LogEvents.GoCardLessLinkFailed.name,
institutionId,
availableHistory,
redirectBase,
});

throw error;
}

throw error;
}
Expand Down

0 comments on commit 1464563

Please sign in to comment.