Skip to content

Commit c746776

Browse files
committed
fix: add 404 error
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
1 parent fe0c5a5 commit c746776

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

backend/src/api/public/v1/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import { Router } from 'express'
22

3+
import { NotFoundError } from '@crowd/common'
4+
35
import { AUTH0_CONFIG } from '../../../conf'
46
import { oauth2Middleware } from '../middlewares/oauth2Middleware'
57
import { staticApiKeyMiddleware } from '../middlewares/staticApiKeyMiddleware'
@@ -15,5 +17,9 @@ export function v1Router(): Router {
1517
router.use('/organizations', oauth2Middleware(AUTH0_CONFIG), organizationsRouter())
1618
router.use('/member-organization-affiliations', staticApiKeyMiddleware(), devStatsRouter())
1719

20+
router.use(() => {
21+
throw new NotFoundError()
22+
})
23+
1824
return router
1925
}

0 commit comments

Comments
 (0)