@@ -17,47 +17,47 @@ pub struct ConnectionCookie(pub ConnectionId);
1717pub enum Error {
1818 /// Error returned when the request is invalid.
1919 #[ error( "error parsing request: {request_parse_error:?}" ) ]
20- RequestParseError { request_parse_error : SendableRequestParseError } ,
20+ InvalidRequest { request_parse_error : SendableRequestParseError } ,
2121
2222 /// Error returned when the domain tracker returns an announce error.
2323 #[ error( "tracker announce error: {source}" ) ]
24- UdpAnnounceError { source : UdpAnnounceError } ,
24+ AnnounceFailed { source : UdpAnnounceError } ,
2525
2626 /// Error returned when the domain tracker returns an scrape error.
2727 #[ error( "tracker scrape error: {source}" ) ]
28- UdpScrapeError { source : UdpScrapeError } ,
28+ ScrapeFailed { source : UdpScrapeError } ,
2929
3030 /// Error returned from a third-party library (`aquatic_udp_protocol`).
3131 #[ error( "internal server error: {message}, {location}" ) ]
32- InternalServer {
32+ Internal {
3333 location : & ' static Location < ' static > ,
3434 message : String ,
3535 } ,
3636
3737 /// Error returned when tracker requires authentication.
3838 #[ error( "domain tracker requires authentication but is not supported in current UDP implementation. Location: {location}" ) ]
39- TrackerAuthenticationRequired { location : & ' static Location < ' static > } ,
39+ AuthRequired { location : & ' static Location < ' static > } ,
4040}
4141
4242impl From < RequestParseError > for Error {
4343 fn from ( request_parse_error : RequestParseError ) -> Self {
44- Self :: RequestParseError {
44+ Self :: InvalidRequest {
4545 request_parse_error : request_parse_error. into ( ) ,
4646 }
4747 }
4848}
4949
5050impl From < UdpAnnounceError > for Error {
5151 fn from ( udp_announce_error : UdpAnnounceError ) -> Self {
52- Self :: UdpAnnounceError {
52+ Self :: AnnounceFailed {
5353 source : udp_announce_error,
5454 }
5555 }
5656}
5757
5858impl From < UdpScrapeError > for Error {
5959 fn from ( udp_scrape_error : UdpScrapeError ) -> Self {
60- Self :: UdpScrapeError {
60+ Self :: ScrapeFailed {
6161 source : udp_scrape_error,
6262 }
6363 }
0 commit comments