aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/mod.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-02 10:25:16 +0100
committertv <tv@krebsco.de>2026-11-02 10:25:16 +0100
commit9a73a89e5888df59bbdaff1279bd65e51264cd61 (patch)
tree45195b508cf89f01b04ec78e7354704189b00744 /src/api/mod.rs
parent21f11eba10d34fb9ab1cbeabb70cc86328185163 (diff)
api: add application/vnd.continuum.* scalar types
Diffstat (limited to 'src/api/mod.rs')
-rw-r--r--src/api/mod.rs7
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