JavaScript is disabled, refresh for a better experience. ambee/giterated

ambee/giterated

Git repository hosting, collaboration, and discovery for the Fediverse.

Expose errors

Amber - ⁨2⁩ years ago

parent: tbd commit: ⁨6b2125c

⁨src/messages/mod.rs⁩ - ⁨458⁩ bytes
Raw
1 use serde::{Deserialize, Serialize};
2 use std::fmt::Debug;
3
4 use crate::model::user::User;
5
6 pub mod authentication;
7 pub mod discovery;
8 pub mod error;
9 pub mod handshake;
10 pub mod issues;
11 pub mod repository;
12 pub mod user;
13
14 #[derive(Clone, Debug, Serialize, Deserialize, thiserror::Error)]
15 pub enum ErrorMessage {
16 #[error("user {0} doesn't exist or isn't valid in this context")]
17 InvalidUser(User),
18 #[error("internal error: shutdown")]
19 Shutdown,
20 }
21