"use strict";function createError(r,t){return"object"==typeof r?new CustomError(r):new CustomError(r,t)}Object.defineProperty(exports,"__esModule",{value:!0});exports.CustomError=void 0;exports.createError=createError;class CustomError extends Error{constructor(r,t){const e="object"==typeof r?r.statusCode:r,o="object"==typeof r?r.message:t;super(o);this.statusCode=e;this.message=o;Object.setPrototypeOf(this,new.target.prototype)}}exports.CustomError=CustomError;