Edge function 'The deployment failed while serving the request' when visiting site after a deployment

Recently, I’ve seen the following error appear when visiting my site (https://wolstenhol.me / cranky-mcnulty-01683e) after a deployment. I’ve spotted this happening twice, so far:

This edge function has crashed
An unhandled error in the function code triggered the following message:
The deployment failed while serving the request.
Connection details
Netlify internal ID: 01GFH9YTM8PRTN9XC7NN0CP70F

The only messages in my edge function logs look like these:

10:07:16 PM: scrubbed alt-svc header
10:09:12 PM: scrubbed alt-svc header
10:09:26 PM: scrubbed alt-svc header

Is there anything I can do about this on my end? It’s hard to know what to do when there isn’t much info in the logs.

My edge functions can be seen here: wolstenhol-11ty/netlify/edge-functions at main · philwolstenholme/wolstenhol-11ty · GitHub, I think it should just be strip-non-html-headers and remove-js that could cause an error when accessing /.

Just had it happen again with internal ID 01GFJX4QYXFCAWHCDPD9CAD71P and 01GFJYFZEFE8268JC9ASPJ8S2B

I’ve disabled my strip-non-html-headers edge function, and I’m going to see if that helps:

This function had been in place for a few weeks and I’ve only seen this error a few times, so I don’t think the function is at fault, but I might be wrong. The code for it can be found here: wolstenhol-11ty/strip-non-html-headers.js at main · philwolstenholme/wolstenhol-11ty · GitHub

Just had this happen again, ID is 01GFKEWP2QM6TJDYV2456VHQD5, and 01GFKFDER2VMNW94GX9FWGASHY

Thanks for all those details @philw ! We’ve opened an escalation with the edge functions dev team for their insights on this. They are working with the Deno crew to debug so it may not be instant, but the work is in progress already.

1 Like

I also ended up disabling my no-js edge function too.
This was the last of the two functions set to run on all paths. Since then things have seemed fine, but it could be coincidence.

Edit: let me know if you’d like me to turn them back on but for a particular path (to allow debugging while preventing any issues for visitors to my site).

To close the loop on this one:

We have identified a problem residing in an upstream service that is causing these errors. Presently we are working with the provider on this issue and are waiting for a code fix from them. We apologize for the inconvenience and are doing as much as we can to aid the provider in the restoration of service.

1 Like

Thank you @hrishikesh :slight_smile: