const getRequestParam = ({ req, param, defaultValue, error, errorString, }) => {
    const value = req.params[param];
    if (value === undefined && error) {
        const errorMessage = errorString || 'Crtitical request parameter is undefined:';
        throw new Error(`${errorMessage}: paramname: ${param}`);
    }
    return value || defaultValue || '';
};

export { getRequestParam };
//# sourceMappingURL=indexedAccesHelper.js.map
