pub enum GatewayError {
Config(String),
Schema(String),
Policy(String),
Database(String),
Auth(String),
AccessDenied(String),
InvalidQuery(String),
Internal(Error),
}Expand description
Main error type for the gateway
Variants§
Config(String)
Configuration error
Schema(String)
Schema loading error
Policy(String)
Policy loading error
Database(String)
Database connection error
Auth(String)
Authentication error
AccessDenied(String)
Authorization error (policy violation)
InvalidQuery(String)
Query validation error
Internal(Error)
Internal server error
Implementations§
Source§impl GatewayError
impl GatewayError
Sourcepub fn status_code(&self) -> u16
pub fn status_code(&self) -> u16
Get HTTP status code for this error
Trait Implementations§
Source§impl Debug for GatewayError
impl Debug for GatewayError
Source§impl Display for GatewayError
impl Display for GatewayError
Source§impl Error for GatewayError
impl Error for GatewayError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for GatewayError
impl RefUnwindSafe for GatewayError
impl Send for GatewayError
impl Sync for GatewayError
impl Unpin for GatewayError
impl UnwindSafe for GatewayError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more