Files
tuliprox/frontend/src/error.rs
T
euzuandGitHub 56ea26d764 Fix/dvr (#836)
New Features

    Added recording availability checks before opening recording forms, with clear service-status errors.
    Added configurable recording settings for retention, disk limits, quotas, notifications, priority, and filename templates.
    Recording configuration is now available in video settings.
    Added validation for recording quotas, ranges, and unsigned values.

Bug Fixes

    Improved recording progress updates and configuration preservation.
    Recording navigation visibility now follows recording permissions.

Style

    Improved muted and debug log-console contrast across themes.

Translations

    Updated English, Arabic, and Russian recording-related messages.
2026-08-24 20:14:47 +02:00

65 lines
1.3 KiB
Rust

use serde::{Deserialize, Serialize};
use std::collections::HashMap;
use thiserror::Error as ThisError;
/// Conduit api error info for Unprocessable Entity error
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ErrorSetInfo {
pub errors: HashMap<String, Vec<String>>,
}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ErrorInfo {
pub error: String,
}
/// Define all possible errors
#[derive(ThisError, Clone, Debug, PartialEq, Eq)]
pub enum Error {
/// 400
#[error("{0}")]
BadRequest(String),
/// 401
#[error("Unauthorized")]
Unauthorized,
/// 403
#[error("{0}")]
Forbidden(String),
/// 404
#[error("Not Found")]
NotFound,
/// 409
#[error("{0}")]
Conflict(String),
/// 428
#[error("{0}")]
PreconditionRequired(String),
/// 422
#[error("Unprocessable Entity: {0:?}")]
UnprocessableEntity(ErrorSetInfo),
/// 500
#[error("{0}")]
InternalServerError(String),
/// Non-success HTTP response not covered by a dedicated variant.
#[error("{0}")]
HttpResponse(String),
/// serde deserialize error
#[error("Deserialize Error")]
DeserializeError,
/// request error
#[error("Http Request Error")]
RequestError,
}