question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

🐛 BUG: Response.redirect - showing up as an entirely empty body

See original GitHub issue

What version of Wrangler are you using?

Unknown

What operating system are you using?

Windows

Describe the Bug

Having an issue with the mailchannelsPlugin as discussed in the pages-plugins Channel in the Cloudflare Discord.

when submitting a form, the page just shows up as an “entirely empty body” the code that I’m using to try and redirect the page is below.

  respondWith: () => {
    return Response.redirect('https://domain.tld/thank-you/', 302);
  },
})(context);

I tried removing the https:// from the Response.redirect but it gave an error of unable to parse the URL.

Not sure if its an isolated issue due to my poor TypeScript knowledge or an actual issue with Wrangler.

Cheers, Tito

Issue Analytics

  • State:open
  • Created 10 months ago
  • Reactions:1
  • Comments:7

github_iconTop GitHub Comments

1reaction
klaemocommented, Nov 23, 2022

Here’s a minimal repro: https://github.com/klaemo/cloudflare-functions-status-bug.

I reported this on discord on 2022-10-31 and there’s supposed to be an internal ticket for it somewhere.

0reactions
chescoscommented, Dec 16, 2022

BTW, I experience this issue due to the Sentry plugin. So it may be all plugins causing this issue, or at least some of them.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Response.Redirect("about:blank"); - MSDN - Microsoft
So I tried to use "about:blank". Since it doesn't work I created now an empty form ("error.aspx"). Now it looks like this and...
Read more >
Response.Redirect with POST instead of Get? - Stack Overflow
When the form is submitted, show the user a page that has a form in it with all of the data you want...
Read more >
How To Fix the HTTP 302 Error (5 Methods) - Kinsta
HTTP 302 codes are useful to temporarily redirect website users to another URL. If you're getting this error code, here are 5 ways...
Read more >
Redirections in HTTP - MDN Web Docs - Mozilla
In HTTP, redirection is triggered by a server sending a special redirect response to a request. Redirect responses have status codes that ...
Read more >
The Ultimate Guide to Django Redirects - Real Python
The key takeaway here is that an HTTP redirect is like any old HTTP response, but with an empty body, 3xx status code,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found