Return a json response in scheduling_policy handler (#10904)

Return an empty json response in the `scheduling_policy` handler.

This prevents errors of the form:

```
Error: receive body: error decoding response body: EOF while parsing a value at line 1 column 0
```

when setting the scheduling policy via the `storcon_cli`.

part of #9011.
This commit is contained in:
Arpad Müller
2025-02-21 12:01:57 +01:00
committed by GitHub
parent 61d385caea
commit f927ae6e15

View File

@@ -1354,10 +1354,7 @@ async fn handle_safekeeper_scheduling_policy(
.set_safekeeper_scheduling_policy(id, body.scheduling_policy)
.await?;
Ok(Response::builder()
.status(StatusCode::NO_CONTENT)
.body(Body::empty())
.unwrap())
json_response(StatusCode::OK, ())
}
/// Common wrapper for request handlers that call into Service and will operate on tenants: they must only