This commit is contained in:
Igor Katson 2023-11-24 18:28:46 +00:00
parent 0b8580dacd
commit d7a37c1b48
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
11 changed files with 337 additions and 168 deletions

View file

@ -19,6 +19,14 @@ impl ApiError {
}
}
pub fn not_implemented(msg: &str) -> Self {
Self {
status: Some(StatusCode::INTERNAL_SERVER_ERROR),
kind: ApiErrorKind::Other(anyhow::anyhow!("{}", msg)),
plaintext: false,
}
}
pub const fn dht_disabled() -> Self {
Self {
status: Some(StatusCode::NOT_FOUND),