// it doesn't have its own stub/test Rails API, so we rely on
// "connection refused" to indicate the controller tried to
// proxy the request to its local Rails API.
- c.Check(resp.StatusCode, check.Equals, http.StatusInternalServerError)
+ c.Check(resp.StatusCode, check.Equals, http.StatusBadGateway)
s.checkJSONErrorMatches(c, resp, `.*connection refused`)
}
req := httptest.NewRequest("GET", "/arvados/v1/workflows/"+arvadostest.WorkflowWithDefinitionYAMLUUID, nil)
req.Header.Set("Authorization", "Bearer "+arvadostest.ActiveToken)
resp := s.testRequest(req)
- c.Check(resp.StatusCode, check.Equals, http.StatusInternalServerError)
+ c.Check(resp.StatusCode, check.Equals, http.StatusBadGateway)
s.checkJSONErrorMatches(c, resp, `.*HTTP response to HTTPS client`)
}
req := httptest.NewRequest("GET", "/discovery/v1/apis/arvados/v1/rest", nil)
resp := httptest.NewRecorder()
s.handler.ServeHTTP(resp, req)
- c.Check(resp.Code, check.Equals, http.StatusInternalServerError)
+ c.Check(resp.Code, check.Equals, http.StatusBadGateway)
var jresp httpserver.ErrorResponse
err := json.Unmarshal(resp.Body.Bytes(), &jresp)
c.Check(err, check.IsNil)
}).WithContext(ctx)
resp, err := client.Do(reqOut)
if err != nil {
- httpserver.Error(w, err.Error(), http.StatusInternalServerError)
+ httpserver.Error(w, err.Error(), http.StatusBadGateway)
return
}
for k, v := range resp.Header {