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

Upgrade to Express 5.X for better promise rejection handling #1

Open
sajansharmanz opened this issue Feb 12, 2024 · 0 comments
Open
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@sajansharmanz
Copy link
Owner

sajansharmanz commented Feb 12, 2024

Issue:
Currently we are having to use try/catch blocks in our controllers to handle rejected promises.

Fix:
Express 5.X has better promise rejection handling (https://expressjs.com/en/guide/migrating-5.html#rejected-promises) which won't involve having to use try/catch blocks in the controllers.

Next Steps:
Currently Express 5.X is marked as beta but discussions have opened up to release this properly asap (expressjs/discussions#160).

Therefore next steps will be;

  • Wait for Express 5.X to be released
  • Upgrade to new version
  • Remove try/catch blocks
  • Test error handling
@sajansharmanz sajansharmanz added enhancement New feature or request good first issue Good for newcomers labels Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant