From 74ced20c6013b7ced9ae14a41033f60239790f6a Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 2 Nov 2026 10:25:16 +0100 Subject: api: add application/vnd.continuum.* scalar types --- src/api/mod.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/api/mod.rs') 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 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 -- cgit v1.3.1