Browse Source

update comments

czhen 3 years ago
parent
commit
757b7197ae
1 changed files with 2 additions and 0 deletions
  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);
   }