Handle API server errors

In case our proxy cannot reach the API server, return 500