Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Response.error() #3592

Merged
merged 1 commit into from
Feb 24, 2025
Merged

Implement Response.error() #3592

merged 1 commit into from
Feb 24, 2025

Conversation

jasnell
Copy link
Member

@jasnell jasnell commented Feb 22, 2025

Builds on #3590 to implement Response.error().

WinterTC will be including Response.error() is the fetch subset that compliant runtimes should implement, and Response.error() is necessary for nodejs_compat.

Fixes: #3591

@jasnell jasnell requested a review from anonrig February 22, 2025 18:48
@jasnell jasnell requested review from a team as code owners February 22, 2025 18:48
@jasnell jasnell requested a review from npaun February 22, 2025 18:48
@jasnell jasnell changed the title Add Response.prototype.type property Implement Response.error() Feb 22, 2025
Copy link

github-actions bot commented Feb 22, 2025

The generated output of @cloudflare/workers-types matches the snapshot in types/generated-snapshot 🎉

@jasnell jasnell changed the base branch from main to jasnell/fetch-response-type February 22, 2025 19:10
@jasnell jasnell changed the base branch from jasnell/fetch-response-type to main February 22, 2025 19:10
// determined that only the `'default'` and `'error'` properties should be implemented.
// We currently due not implement Response.error() so "default" is the only value we
// currently support.
kj::StringPtr getType() {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
kj::StringPtr getType() {
kj::StringPtr getType() const {

@jasnell jasnell force-pushed the jasnell/fetch-response-error branch 2 times, most recently from 2adfe46 to 27b5944 Compare February 24, 2025 17:40
Signed-off-by: James M Snell <jsnell@cloudflare.com>
@jasnell jasnell force-pushed the jasnell/fetch-response-error branch from 27b5944 to b68c8a6 Compare February 24, 2025 18:13
@jasnell
Copy link
Member Author

jasnell commented Feb 24, 2025

Internal PR passed CI.

@jasnell jasnell merged commit fe0d716 into main Feb 24, 2025
16 of 17 checks passed
@jasnell jasnell deleted the jasnell/fetch-response-error branch February 24, 2025 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement Response.error()
2 participants