Skip to content
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

Unified error handling - Basic Messages #36

Merged
merged 7 commits into from
Jan 5, 2024

Conversation

jonmattgray
Copy link
Contributor

@jonmattgray jonmattgray commented Jan 4, 2024

First step of using a single, unified error handler that catches errors thrown in controllers and sets the response and logs correctly.
Also fixes npm run dev and removes a couple of build files from the repo

Example 404
image
Logs
image

Example 500
image
Logs
image

.gitignore Show resolved Hide resolved
@jonmattgray jonmattgray marked this pull request as ready for review January 4, 2024 15:52
src/error.ts Show resolved Hide resolved
Copy link
Contributor

@msterle msterle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like a great start

src/server.ts Show resolved Hide resolved
src/error.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@msterle msterle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jonmattgray jonmattgray merged commit 71b9cc1 into main Jan 5, 2024
6 checks passed
@jonmattgray jonmattgray deleted the feat/unified-error-handling branch January 5, 2024 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants