Skip to content

fix: await mapped error response promise#1797

Merged
SaltyAom merged 1 commit intoelysiajs:mainfrom
MegaManSec:j6
Mar 11, 2026
Merged

fix: await mapped error response promise#1797
SaltyAom merged 1 commit intoelysiajs:mainfrom
MegaManSec:j6

Conversation

@MegaManSec
Copy link
Contributor

@MegaManSec MegaManSec commented Mar 10, 2026

Summary by CodeRabbit

  • Bug Fixes
    • Fixed promise handling in response mapping to ensure correct error propagation and result processing.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 10, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e894eb94-8423-4ab9-95a7-dec2c273140d

📥 Commits

Reviewing files that changed from the base of the PR and between 169e54a and 22416bd.

📒 Files selected for processing (1)
  • src/compose.ts

Walkthrough

A bug fix in the error handling logic of mapResponse corrects the awaiting of mapped response promises. The code now properly awaits the promise result and assigns it back before updating the error reference variable.

Changes

Cohort / File(s) Summary
Error Handling Fix
src/compose.ts
Fixed incorrect promise awaiting in mapResponse error handling branch; now correctly awaits mapped response and propagates result to error reference.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A promise awaited, but not quite right,
Now holds its value with proper might,
Error handlers skip their gentle dance,
As mep gets its moment, a second chance!
The CodeRabbit

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: fixing the awaiting of a mapped error response promise in src/compose.ts.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 11, 2026

Open in StackBlitz

npm i https://pkg.pr.new/elysia@1797

commit: ad873f7

@SaltyAom SaltyAom merged commit dd6fab3 into elysiajs:main Mar 11, 2026
2 checks passed
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.

2 participants