pub enum BackendError {
AvailablePort,
PortInUse(u16),
ServerError(ServerError),
AlreadyAProject(PathBuf),
ProjectDirectoryExists(PathBuf),
ReadCurrentDirectory,
CreateGrafbaseDirectory,
WriteSchema,
DeleteDotGrafbaseDirectory(Error),
}Variants§
AvailablePort
returned if no port is available. used specifically when searching for ports
PortInUse(u16)
returned if a given port is in use and the search option is not used
ServerError(ServerError)
wraps a server error
AlreadyAProject(PathBuf)
returned when trying to initialize a project that conflicts with an existing project
ProjectDirectoryExists(PathBuf)
returned when trying to initialize a project that conflicts with an existing directory or file
ReadCurrentDirectory
returned if the current directory path cannot be read
CreateGrafbaseDirectory
returned if the grafbase directory cannot be created
WriteSchema
returned if a schema.graphql file cannot be created
DeleteDotGrafbaseDirectory(Error)
returned if the dot grafbase directory cannot be deleted
Trait Implementations§
source§impl Debug for BackendError
impl Debug for BackendError
source§impl Display for BackendError
impl Display for BackendError
source§impl Error for BackendError
impl Error for BackendError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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()
source§impl ToExitCode for BackendError
impl ToExitCode for BackendError
source§fn to_exit_code(&self) -> i32
fn to_exit_code(&self) -> i32
returns the appropriate exit code for a given error