Skip to content

Conversation

kricsleo
Copy link
Member

resolves #1166

(Also wondering if we can revert the v1's boolean return value to minimize breaking changes 🤔)

@kricsleo kricsleo requested a review from pi0 as a code owner July 23, 2025 03:07
Copy link

codecov bot commented Jul 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@pi0
Copy link
Member

pi0 commented Jul 23, 2025

Yes i think might make sense for v1 (also v2) to avoid returning falsy like "" value.

Do you know why we did that? (i have to check history) but seems your suggestion for avoid that is more sensable than asking for === false check.

@kricsleo
Copy link
Member Author

kricsleo commented Jul 23, 2025

I think this change might be unintentional. Firstly, it was return true when handled, then it was changed to return noContent(...). From this point on, the falsy check no longer works as expected since noContent would return an empty string.

@randName
Copy link
Contributor

I wonder if noContent should just construct a proper Response instead of returning an empty string, then the original check should work

@kricsleo
Copy link
Member Author

kricsleo commented Aug 5, 2025

noContent should just construct a proper Response

Yeah, I agree with this; it would be more usable. 👍
This PR can be safely closed if #1177 is merged.

Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@pi0 pi0 merged commit 5409608 into h3js:main Sep 29, 2025
4 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.

handleCors() returns falsy sentinel (""), conflicting with example usage.

3 participants