Skip to content

Commit a5394d5

Browse files
authored
fix: remove logger.errorHandler. (GoogleCloudPlatform#676)
1 parent 55f97f5 commit a5394d5

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

src/logger.ts

-11
Original file line numberDiff line numberDiff line change
@@ -90,17 +90,6 @@ function interceptStderrWrite() {
9090
};
9191
}
9292

93-
export const errorHandler = (
94-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
95-
err: Error | any,
96-
req: express.Request, // eslint-disable-line @typescript-eslint/no-unused-vars
97-
res: express.Response,
98-
next: express.NextFunction // eslint-disable-line @typescript-eslint/no-unused-vars
99-
) => {
100-
interceptStderrWrite();
101-
sendCrashResponse({err, res});
102-
};
103-
10493
// eslint-disable-next-line @typescript-eslint/no-explicit-any
10594
export function splitArgs(args: any[]) {
10695
let encoding, cb;

src/server.ts

-6
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import {timeoutMiddleware} from './middleware/timeout';
2525
import {wrapUserFunction} from './function_wrappers';
2626
import {asyncLocalStorageMiddleware} from './async_local_storage';
2727
import {executionContextMiddleware} from './execution_context';
28-
import {errorHandler} from './logger';
2928
import {FrameworkOptions} from './options';
3029

3130
/**
@@ -161,10 +160,5 @@ export function getServer(
161160
app.post('/*', requestHandler);
162161
}
163162

164-
// Error Handler
165-
if (options.enableExecutionId) {
166-
app.use(errorHandler);
167-
}
168-
169163
return http.createServer(app);
170164
}

0 commit comments

Comments
 (0)