File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ import archivedEnterpriseVersions from '@/archives/middleware/archived-enterpris
35
35
import robots from './robots'
36
36
import earlyAccessLinks from '@/early-access/middleware/early-access-links'
37
37
import categoriesForSupport from './categories-for-support'
38
- import triggerError from '@/observability/middleware/trigger-error.js '
38
+ import triggerError from '@/observability/middleware/trigger-error'
39
39
import secretScanning from '@/secret-scanning/middleware/secret-scanning.js'
40
40
import ghesReleaseNotes from '@/release-notes/middleware/ghes-release-notes.js'
41
41
import whatsNewChangelog from './context/whats-new-changelog.js'
Original file line number Diff line number Diff line change
1
+ import type { Response , NextFunction } from 'express'
2
+
3
+ import type { ExtendedRequest } from '@/types'
4
+
1
5
// This module is for testing our handling of uncaught async rejections on incoming requests
2
6
3
7
// IMPORTANT: Leave this function as `async` even though it doesn't need to be!
4
- export default async function triggerError ( req , res , next ) {
8
+ export default async function triggerError (
9
+ req : ExtendedRequest ,
10
+ res : Response ,
11
+ next : NextFunction ,
12
+ ) {
5
13
// IMPORTANT:
6
14
// Do NOT wrap this method's contents in the usual `try-catch+next(error)`
7
15
// pattern used on async middleware! This is an intentional omission!
You can’t perform that action at this time.
0 commit comments