Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanoverna committed Jan 3, 2025
1 parent 70bfff8 commit 31f9a99
Showing 1 changed file with 15 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,21 @@ export async function paramsToRecordId(
throw new Error('Missing missingParamsToRecordId');
}

const recordId = await paramsToRecordId({
executeQueryOptions,
params,
});

if (recordId) {
return { result: 'recordFound', recordId };
} else if (!isKnownRoute) {
return { result: 'invalidParams' };
try {
const recordId = await paramsToRecordId({
executeQueryOptions,
params,
});

if (recordId) {
return { result: 'recordFound', recordId };
} else if (!isKnownRoute) {
return { result: 'invalidParams' };
}
} catch (e) {
if (!isKnownRoute) {
throw e;
}
}
}
}
Expand Down

0 comments on commit 31f9a99

Please sign in to comment.