diff --git a/api/limits.ts b/api/limits.ts index a040435ba..c766de888 100644 --- a/api/limits.ts +++ b/api/limits.ts @@ -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.`); }