@dcl/platform-server-commons
Version:
Platform's Http Server Common utils
14 lines • 393 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseJson = void 0;
const errors_1 = require("../errors");
async function parseJson(request) {
try {
return (await request.json());
}
catch (error) {
throw new errors_1.InvalidRequestError('Invalid body');
}
}
exports.parseJson = parseJson;
//# sourceMappingURL=parsing.js.map