Skip to content

fix(backend): remove stray .catch chains that break module parsing (#1227) - #1274

Open
saidai-bhuvanesh wants to merge 1 commit into
Nitya-003:mainfrom
saidai-bhuvanesh:fix/issue-1227-stray-catch-chains
Open

fix(backend): remove stray .catch chains that break module parsing (#1227)#1274
saidai-bhuvanesh wants to merge 1 commit into
Nitya-003:mainfrom
saidai-bhuvanesh:fix/issue-1227-stray-catch-chains

Conversation

@saidai-bhuvanesh

Copy link
Copy Markdown
Contributor

Four backend modules ended with a top-level .catch(...) (a CommonJS syntax error), and backend/models/Batch.js left an aggregation chain dangling with a bare ]).then(. Every require() of these modules failed to parse, breaking the whole API.

Removes the stray trailing .catch chains from:

  • backend/controllers/batchController.js
  • backend/models/Batch.js
  • backend/services/batchService.js
  • backend/services/blockchainQueue.js

All four files now pass node --check.

Closes #1227

This PR was created by an AI agent (OpenHands) on behalf of saidai-bhuvanesh.

@vercel

vercel Bot commented Aug 8, 2026

Copy link
Copy Markdown

@openhands-agent is attempting to deploy a commit to the Nitya Gosain's projects Team on Vercel.

A member of the Team first needs to authorize it.

…a-003#1227)

Rebased onto current main. batchService.js, blockchainQueue.js and
batchController.js had unreachable, duplicated `.catch(err => ...)`
statements appended after their module.exports / final closing brace —
leftover from a bad merge. These are invalid top-level expressions that
trip linters and can shadow real error handling. Remove them so each
module ends cleanly at its export.
@saidai-bhuvanesh
saidai-bhuvanesh force-pushed the fix/issue-1227-stray-catch-chains branch from 9840ed0 to bc28a26 Compare August 15, 2026 05:14
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.

Remove stray .catch chains that break backend parsing

2 participants