Skip to content

Rename internal errorOccured -> errorOccurred in make-middleware#1393

Closed
SAY-5 wants to merge 1 commit intoexpressjs:mainfrom
SAY-5:fix-error-occured-typo
Closed

Rename internal errorOccured -> errorOccurred in make-middleware#1393
SAY-5 wants to merge 1 commit intoexpressjs:mainfrom
SAY-5:fix-error-occured-typo

Conversation

@SAY-5
Copy link
Copy Markdown

@SAY-5 SAY-5 commented Apr 15, 2026

lib/make-middleware.js keeps a one-shot 'has the upload errored?' flag named errorOccured (5 references). The variable is private to the closure that builds the middleware so the rename is invisible to consumers, but it removes a spelling mistake from a high-traffic project.

35:    var errorOccured = false
73:      if (readFinished && pendingWrites.isZero() && !errorOccured) done()
77:      if (errorOccured) return
78:      errorOccured = true
184:        if (errorOccured) {

Verification:

  • npm test — all 72 mocha tests pass
  • npm run lint (standard) — clean

Source verified against current main.

The middleware kept a one-shot 'has the upload errored?' flag named
errorOccured (5 references in lib/make-middleware.js). The variable is
private to the closure, so the rename is invisible to consumers but
removes a small spelling mistake from a 12k-star project. All 72
mocha tests pass and 'standard' lint stays clean.
@SAY-5
Copy link
Copy Markdown
Author

SAY-5 commented Apr 28, 2026

Closing — typo-only PR. Multiple maintainers across the OSS ecosystem have flagged my recent typo-sweep PRs as AI-generated spam (notably hashicorp/nomad#27855, hashicorp/hcl#794, argo-cd reviewers). I should have caught this pattern sooner. Apologies for the noise.

@SAY-5 SAY-5 closed this Apr 28, 2026
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.

1 participant