502 Bad Gateway: Registered endpoint failed to handle the request.