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

twirp-transport: Guard access of response.type to support Cloudflare Workers #321

Merged
merged 1 commit into from
Jun 3, 2022
Merged

twirp-transport: Guard access of response.type to support Cloudflare Workers #321

merged 1 commit into from
Jun 3, 2022

Commits on May 27, 2022

  1. Guard access of response.type to support Cloudflare Workers

    Fetch responses in Cloudflare Workers currently throw an error on access
    of the "type" property[^1][^2]. This commit guards access of the type
    property with a try/catch so that twirp clients can be used inside of
    Cloudflare Workers.
    
    [^1]: https://developers.cloudflare.com/workers/runtime-apis/response/#properties
    [^2]: https://github.com/cloudflare/miniflare/blob/72f046e/packages/core/src/standards/http.ts#L646
    Mikey Lemmon committed May 27, 2022
    Configuration menu
    Copy the full SHA
    729bb3c View commit details
    Browse the repository at this point in the history