mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
8 lines
239 B
TypeScript
8 lines
239 B
TypeScript
export const ABSENT_PARAM_ERROR_MESSAGE = 'Required param not provided';
|
|
|
|
export default function throwOnAbsentParamError(param: unknown) {
|
|
if (!param) {
|
|
throw new Error(ABSENT_PARAM_ERROR_MESSAGE, { cause: { status: 404 } });
|
|
}
|
|
}
|