Edge 502 error: The subhoster origin returned a failure status for the boot RPC call

Recently an Edge function stopped working. It has been running happily for months now and no changes have been done to the edge function. We currently get the following error:

# This edge function has crashed
An unhandled error in the function code triggered the following message:

The subhoster origin returned a failure status for the boot RPC call. Status: 500 Internal Server Error

### Connection details
Netlify internal ID: `01H8AHGH5RQQ0D9W35FDZXJ1HD`

I have found some posts that it might be the function size that could trigger this error but as I said that hasn’t changed recently.
This function is executed for every request as it handles routing for 2 apps depending on the origin or referrer. Could this trigger some kind of overload?

Hi, we have responded to ticket # 177828. Please follow up there if you have another questions.