This error is usually related to the incapacity of the proxy to get a valid response from the origin server. Assuming that’s your issue too, take a look at this guide dedicated to solving Crunchyroll Bad Gateway errors 502, 1005, 1015.