Files
explore/lib/errors/throwOnAbsentParamError.ts
T
tom goriunovandGitHub acb6cb44d6 navigation doesn't work on error pages (#1519)
* navigation doesn't work on error pages

Fixes #1518

* unify API resource thrown errors and disable Sentry logging for them

* test fix
2024-01-22 17:36:30 +04:00

6 lines
168 B
TypeScript

export default function throwOnAbsentParamError(param: unknown) {
if (!param) {
throw new Error('Required param not provided', { cause: { status: 404 } });
}
}