apollo_router/router/
error.rs

1use std::fmt::Debug;
2use std::net::IpAddr;
3
4use displaydoc::Display as DisplayDoc;
5use thiserror::Error;
6use tower::BoxError;
7
8/// Error types for FederatedServer.
9#[derive(Error, Debug, DisplayDoc)]
10pub enum ApolloRouterError {
11    /// failed to start server
12    StartupError,
13
14    /// failed to stop HTTP Server
15    HttpServerLifecycleError,
16
17    /// no valid configuration was supplied
18    NoConfiguration,
19
20    /// no valid schema was supplied
21    NoSchema,
22
23    /// no valid license was supplied
24    NoLicense,
25
26    /// license violation
27    LicenseViolation,
28
29    /// could not create router: {0}
30    ServiceCreationError(BoxError),
31
32    /// could not create the HTTP server: {0}
33    ServerCreationError(std::io::Error),
34
35    /// tried to bind {0} and {1} on port {2}
36    DifferentListenAddrsOnSamePort(IpAddr, IpAddr, u16),
37
38    /// tried to register two endpoints on `{0}:{1}{2}`
39    SameRouteUsedTwice(IpAddr, u16, String),
40
41    /// TLS configuration error: {0}
42    Rustls(rustls::Error),
43}