pub enum BackendError {
Show 23 variants
AvailablePort,
PortInUse(u16),
ServerError(ServerError),
AlreadyAProject(PathBuf),
ProjectDirectoryExists(PathBuf),
ReadCurrentDirectory,
CreateGrafbaseDirectory(Error),
CreateProjectDirectory(Error),
WriteSchema(Error),
DeleteDotGrafbaseDirectory(Error),
DeleteGrafbaseDirectory(Error),
UnsupportedTemplateURL(String),
MalformedTemplateURL(String),
StartDownloadRepoArchive(String, Error),
DownloadRepoArchive(String),
TemplateNotFound,
MoveExtractedFiles(Error),
ReadArchiveEntries,
ExtractArchiveEntry(Error),
CleanExtractedFiles(Error),
StartGetRepositoryInformation(String),
GetRepositoryInformation(String),
ReadRepositoryInformation(String),
}
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 could not be read
CreateGrafbaseDirectory(Error)
returned if the grafbase directory could not be created
CreateProjectDirectory(Error)
returned if the project directory could not be created
WriteSchema(Error)
returned if a schema.graphql file could not be created
DeleteDotGrafbaseDirectory(Error)
returned if the dot grafbase directory could not be deleted
DeleteGrafbaseDirectory(Error)
returned if the grafbase directory for the project could not be deleted
UnsupportedTemplateURL(String)
returned if a template URL is not supported
MalformedTemplateURL(String)
returned if a template URL could not be parsed
StartDownloadRepoArchive(String, Error)
returned if a repo tar could not be downloaded (on a non 200-299 status)
DownloadRepoArchive(String)
returned if a repo tar could not be downloaded
TemplateNotFound
returned if no files matching the template path were extracted (excluding extraction errors)
MoveExtractedFiles(Error)
returned if the extracted files from the template repository could not be moved
ReadArchiveEntries
returned if the entries of the template repository archive could not be read
ExtractArchiveEntry(Error)
returned if one of the entries of the template repository archive could not be extracted
CleanExtractedFiles(Error)
returned if the files extracted from the template repository archive could not be cleaned
StartGetRepositoryInformation(String)
returned if the request to get the information for a repository could not be sent
GetRepositoryInformation(String)
returned if the request to get the information for a repository returned a non 200-299 status
ReadRepositoryInformation(String)
returned if the request to get the information for a repository returned a response that could not be parsed