-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CHE-167] BE Refactor Error Handling #150
Conversation
…://github.com/Code-Hammers/code-hammers into CHE-169/subtask/Add-Express-Async-Errors-Dep
…://github.com/Code-Hammers/code-hammers into CHE-169/subtask/Add-Express-Async-Errors-Dep
…to CHE-169/subtask/Add-Express-Async-Errors-Dep
…v-Into-Story-Branch [Che-167b] Pull Dev into Story Branch
…thub.com/Code-Hammers/code-hammers into CHE-169/subtask/Add-Express-Async-Errors-Dep
…-Async-Errors-Dep [CHE-169] Add Express Async Errors Dep
…obal-Error-Handler [CHE-170] Refactor Global Error Handler
…tch-All-Route-Handler [CHE-171] Refactor Catch All Route Handler
…rver-Startup-and-DB-Connection [CHE-172] Refactor Server Startup and DB Connection
…to CHE-167/story/BE-Refactor-Error-Handling
…thub.com/Code-Hammers/code-hammers into CHE-167/story/BE-Refactor-Error-Handling
Pull dev branch changes into CHE-167 Story branch
…th-Middleware [CHE-173] Refactor Auth Middleware
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Glad to see this all come together. 🎉 Nice work!
Im not sure the applications router flow got hooked up. As well there is some odd image behavior at the moment. Possibly fixed in your database seeder ticket?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a comment regarding applications router and images.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @seantokuzo ! I noticed
this code has been removed during your re-org. We will need it reintroduced as it is crucial to the production environment. Our AWS deployment pings this route as part of its monitoring system.
…to CHE-167/story/BE-Refactor-Error-Handling
…and-Add-Back-AWS-Health-Check [CHE-167b] Merge Dev and Add Back AWS Health Check
Description
**This PR requires a rebuild of the development image.
codehammers/ch-dev-dep-v3
does not currently includeexpress-async-errors
dependencyWhat it do:
connectDB
more extensible by accepting connection string as argprotect
middleware to use new error handlinguser
property to express'sRequest
interface to handle type errors in protected routes when trying to accessreq.user
and deletes CustomRequest interface and usage of it/api/auth/validate-session
to use refactoredprotect
middlewareprotect
middleware in all routers/routes
folderJira Task
JIRA TICKET
Testing Instructions
To test you will need to build the
codehammers/ch-dev-dep-v3
image locally to include theexpress-async-errors
dependency:npm run docker-remove-all
docker build -f Dockerfile-dev -t codehammers/ch-dev-dep-v3 .
npm run docker-build-check
to make sure linting and unit tests pass- 3000:3000
to the ports array indocker-compose-dev.yml
to expose the server for manual testingnpm run docker-dev
[{ "message": "Not Found" }]
in the browser❌ NotFoundError
in your terminal with the error's stack trace pointing toapp.ts
All Team Members
npm run docker-build-check
in my local environment to check that this PR passes all linting and unit tests.