diff --git a/compute_tools/src/http/api.rs b/compute_tools/src/http/api.rs index ef6ca6eee3..fa2c4cff28 100644 --- a/compute_tools/src/http/api.rs +++ b/compute_tools/src/http/api.rs @@ -227,7 +227,7 @@ async fn handle_configure_request( let parsed_spec = match ParsedSpec::try_from(spec) { Ok(ps) => ps, - Err(msg) => return Err((msg, StatusCode::PRECONDITION_FAILED)), + Err(msg) => return Err((msg, StatusCode::BAD_REQUEST)), }; // XXX: wrap state update under lock in code blocks. Otherwise, diff --git a/compute_tools/src/http/openapi_spec.yaml b/compute_tools/src/http/openapi_spec.yaml index dc26cc63eb..cedc6ece8f 100644 --- a/compute_tools/src/http/openapi_spec.yaml +++ b/compute_tools/src/http/openapi_spec.yaml @@ -156,17 +156,17 @@ paths: description: Error text or 'OK' if download succeeded. example: "OK" 400: - description: Request is invalid. - content: - application/json: - schema: - $ref: "#/components/schemas/GenericError" + description: Request is invalid. + content: + application/json: + schema: + $ref: "#/components/schemas/GenericError" 500: - description: Extension download request failed. - content: - application/json: - schema: - $ref: "#/components/schemas/GenericError" + description: Extension download request failed. + content: + application/json: + schema: + $ref: "#/components/schemas/GenericError" components: securitySchemes: