From 66049566ae865e1a4bd049257d6afc0abded16e9 Mon Sep 17 00:00:00 2001 From: Vika Date: Mon, 19 Sep 2022 17:30:38 +0300 Subject: feat: indieauth support Working: - Tokens and codes - Authenticating with a password Not working: - Setting the password (need to patch onboarding) - WebAuthn (the JavaScript is too complicated) --- kittybox-rs/util/src/error.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'kittybox-rs/util/src/error.rs') diff --git a/kittybox-rs/util/src/error.rs b/kittybox-rs/util/src/error.rs index 79f43ef..7edf176 100644 --- a/kittybox-rs/util/src/error.rs +++ b/kittybox-rs/util/src/error.rs @@ -4,6 +4,7 @@ use axum_core::response::{Response, IntoResponse}; #[derive(Serialize, Deserialize, PartialEq, Debug)] #[serde(rename_all = "snake_case")] +/// Kinds of errors that can happen within a Micropub operation. pub enum ErrorType { /// An erroneous attempt to create something that already exists. AlreadyExists, @@ -27,6 +28,7 @@ pub enum ErrorType { #[derive(Serialize, Deserialize, Debug)] pub struct MicropubError { pub error: ErrorType, + // TODO use Cow<'static, str> to save on heap allocations pub error_description: String, } -- cgit 1.4.1