Fix asyncHandler to ensure middleware is called on next tick to prevent in-tick throws
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 63/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- express, javascript
Research direction
Read lib/index.js lines 587–615, where asyncHandler calls the middleware. Check how synchronous throws and calls to next behave, then compare them with next-tick or asynchronous calls. Done when middleware is invoked on the next tick and those behaviors are consistent.
Written by the indexing model from the issue text.
Description
const result = middleware(...args); might still throw for any code executed on the same tick -- and the middleware itself might be entirely synchronous. Also, next won't be modified until after the middleware is called, so in-tick calls to next will behave differently to next-tick/async calls.
See: https://github.com/digitalbazaar/bedrock-express/blob/v8.8.1/lib/index.js#L587-L615
- Dominant language
- JavaScript
- Stars
- 0
- Forks
- 3
- Avg merge
- 2h 25m
- Merged PRs (30d)
- 3
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from digitalbazaar/bedrock-express
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
-
If per-route body parser is an empty object we need to prevent defaults from running on that routeOpen
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
All issues in digitalbazaar/bedrock-express
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
OWASP/CheatSheetSeries#3018 ·
Maintainers usually reply within 1 day
-
Radix number block generates NaN after switching a negative or decimal number to binary, octal or hexPossibly taken @matthewalberto claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
mit-cml/appinventor-sources#4246 · 1 comment ·
Maintainers usually reply within 1 day
-
marketing
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 83/100
GoogleChrome/modern-web-guidance-src#3675 · 2 comments ·
Maintainers usually reply within 1 day