1
0
mirror of synced 2025-12-20 10:28:40 -05:00

catch typos near 'AUTOTITLE' (#34493)

Co-authored-by: Sarah Schneider <sarahs@users.noreply.github.com>
This commit is contained in:
Peter Bengtsson
2023-02-07 12:22:44 -05:00
committed by GitHub
parent f99da59c05
commit d7b52e772d
8 changed files with 88 additions and 6 deletions

View File

@@ -3,6 +3,8 @@ import { nextApp } from './next.js'
import { setFastlySurrogateKey, SURROGATE_ENUMS } from './set-fastly-surrogate-key.js'
import { errorCacheControl } from './cache-control.js'
const DEBUG_MIDDLEWARE_TESTS = Boolean(JSON.parse(process.env.DEBUG_MIDDLEWARE_TESTS || 'false'))
function shouldLogException(error) {
const IGNORED_ERRORS = [
// Client connected aborted
@@ -43,7 +45,7 @@ export default async function handleError(error, req, res, next) {
// loading all the middlewares.
setFastlySurrogateKey(res, SURROGATE_ENUMS.DEFAULT)
}
} else if (process.env.NODE_ENV === 'test') {
} else if (DEBUG_MIDDLEWARE_TESTS) {
console.warn('An error occurrred in some middleware handler', error)
}