torrust_tracker/servers/udp/
error.rs1use std::panic::Location;
3
4use thiserror::Error;
5use torrust_tracker_located_error::LocatedError;
6
7#[derive(Error, Debug)]
9pub enum Error {
10 #[error("tracker server error: {source}")]
12 TrackerError {
13 source: LocatedError<'static, dyn std::error::Error + Send + Sync>,
14 },
15
16 #[error("internal server error: {message}, {location}")]
18 InternalServer {
19 location: &'static Location<'static>,
20 message: String,
21 },
22
23 #[error("connection id could not be verified")]
25 InvalidConnectionId { location: &'static Location<'static> },
26
27 #[error("bad request: {source}")]
29 BadRequest {
30 source: LocatedError<'static, dyn std::error::Error + Send + Sync>,
31 },
32
33 #[error("domain tracker requires authentication but is not supported in current UDP implementation. Location: {location}")]
35 TrackerAuthenticationRequired { location: &'static Location<'static> },
36}