Conversation
WalkthroughOptional chaining was added when accessing Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/error.ts (1)
418-437: Guard the remainingmapValueError(error).summaryaccess.This fix is partial: the non-
customErrorJSON path still callsmapValueError(error).summary(Line 461), which can crash whenerroris undefined. Please apply the same optional chaining there to fully close the hole.🔧 Proposed fix
- summary: mapValueError(error).summary, + summary: mapValueError(error)?.summary,
Hit this error when upgrading to Elysia
1.4.22:mapValueError()returns early iferrorisundefined.The code above the change line correctly uses
?.for guarding against that, but this line doesn't.Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.