1 | "use strict";
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | Object.defineProperty(exports, "__esModule", { value: true });
|
7 | exports.createUnexpectedHttpErrorLogger = void 0;
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 | function createUnexpectedHttpErrorLogger(expectedStatusCode) {
|
14 | return function logUnexpectedHttpError(err, statusCode, req) {
|
15 | var _a;
|
16 | if (statusCode === expectedStatusCode)
|
17 | return;
|
18 |
|
19 | console.error('Unhandled error in %s %s: %s %s', req.method, req.url, statusCode, (_a = err.stack) !== null && _a !== void 0 ? _a : err);
|
20 | };
|
21 | }
|
22 | exports.createUnexpectedHttpErrorLogger = createUnexpectedHttpErrorLogger;
|
23 |
|
\ | No newline at end of file |