An error occurred while loading the file. Please try again.
-
Hanadi authored8d158562
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.mapError = void 0;
const mapError = (err) => {
if (err.name === "OGC_Exception") {
const ogcException = err;
return {
code: ogcException.code,
description: ogcException.description,
name: ogcException.name,
status: 500,
};
}
if (err.name in ["Collection_Not_Found", "Format_Not_Found"]) {
return {
name: err.name,
message: err.message,
status: 404,
};
}
return {
name: err.name,
message: err.message,
status: 500,
};
};
exports.mapError = mapError;
//# sourceMappingURL=ErrorHandler.js.map