diff options
| author | tv <tv@krebsco.de> | 2026-11-02 10:25:16 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-02 10:25:16 +0100 |
| commit | 74ced20c6013b7ced9ae14a41033f60239790f6a (patch) | |
| tree | 4998e857559e74ddde74974d431079f33cd0f77b /src/api/mod.rs | |
| parent | 279701059c958555ab3096adb733c865ffdb91ff (diff) | |
api: add application/vnd.continuum.* scalar types
Diffstat (limited to 'src/api/mod.rs')
| -rw-r--r-- | src/api/mod.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/api/mod.rs b/src/api/mod.rs index dfefcc8..713f248 100644 --- a/src/api/mod.rs +++ b/src/api/mod.rs @@ -199,6 +199,13 @@ impl IntoResponse for ApiError { /// A store error as an answer, saying why (`StoreError`'s text) where it is the /// client's; others are logged with `context`, and are a bare `500`. +/// A read's (`store_status`). +impl From<StoreError> for ApiError { + fn from(error: StoreError) -> Self { + store_status(error, "Failed to read store path") + } +} + pub(crate) fn store_status(error: StoreError, context: &str) -> ApiError { let status = match error { StoreError::Conflict |
