Skip to content

Commit

Permalink
fix: Clarify misleading error message (#891)
Browse files Browse the repository at this point in the history
This often fails due to RPC provider issues and incorrectly reports that
the route is disabled.
  • Loading branch information
pxrl authored Oct 30, 2023
1 parent 7a244e4 commit 2643dab
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions api/limits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,13 @@ const handler = async (
]);
// If any of the above fails or the route is not enabled, we assume that the
if (
disabledL1Tokens.includes(l1Token.toLowerCase()) ||
tokenDetailsResult.status === "rejected" ||
routeEnabledResult.status === "rejected" ||
!routeEnabledResult.value
routeEnabledResult.status === "rejected"
) {
throw new InputError(`Unable to query route.`);
} else if (
!routeEnabledResult.value ||
disabledL1Tokens.includes(l1Token.toLowerCase())
) {
throw new InputError(`Route is not enabled.`);
}
Expand Down

2 comments on commit 2643dab

@vercel
Copy link

@vercel vercel bot commented on 2643dab Oct 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

goerli-frontend-v2 – ./

goerli-frontend-v2-uma.vercel.app
goerli-frontend-v2-git-master-uma.vercel.app
goerli-frontend-v2.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 2643dab Oct 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.