SectionList on home screen with API
This commit is contained in:
@@ -1,6 +1,21 @@
|
||||
export { AuthRoutes } from './AuthRoutes'
|
||||
export { AssetRoutes } from './AssetRoutes'
|
||||
export { UserRoutes } from './UserRoutes'
|
||||
export { WorkItemRoutes } from './WorkItemRoutes'
|
||||
export { ActivityRoutes } from './ActivityRoutes'
|
||||
export { TeamRoutes } from './TeamRoutes'
|
||||
export { AuthRoutes } from "./AuthRoutes"
|
||||
export { AssetRoutes } from "./AssetRoutes"
|
||||
export { UserRoutes } from "./UserRoutes"
|
||||
export { WorkItemRoutes } from "./WorkItemRoutes"
|
||||
export { ActivityRoutes } from "./ActivityRoutes"
|
||||
export { TeamRoutes } from "./TeamRoutes"
|
||||
import createError from "http-errors"
|
||||
|
||||
export function catchAll(routeHandler) {
|
||||
return (req, res, next) => {
|
||||
try {
|
||||
routeHandler(req, res, next)
|
||||
} catch (err) {
|
||||
if (err instanceof createError.HttpError) {
|
||||
next(err)
|
||||
} else {
|
||||
next(createError.InternalServerError(err.message))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user