Explorar o código

update comments

czhen %!s(int64=3) %!d(string=hai) anos
pai
achega
757b7197ae
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      express/src/interceptors/index.ts

+ 2 - 0
express/src/interceptors/index.ts

@@ -76,6 +76,8 @@ export const ErrorInterceptor = (
   next: NextFunction
 ) => {
   console.log("---error interceptor---\n%s", err);
+  // Boolean property that indicates if the app sent HTTP headers for the response.
+  // Here to prevent sending response after header has been sent.
   if (res.headersSent) {
     return next(err);
   }