pub enum ForgeError {
NotFound(String),
BadRequest(String),
PathTraversal(String),
Unauthorised(String),
Forbidden(String),
Conflict(String),
Unsupported(String),
Git(GitError),
Io(Error),
Serde(Error),
Backend(String),
}Expand description
All failure modes surfaced by the forge service.
Variants§
NotFound(String)
Resource does not exist (404).
BadRequest(String)
Malformed request / invalid parameter (400).
PathTraversal(String)
Path traversal or otherwise unsafe path (400).
Authentication required but missing/invalid (401).
Forbidden(String)
Authenticated but not permitted — e.g. namespace-write guard (403).
Conflict(String)
Compare-and-swap failure: the base ref moved under a merge (409).
Unsupported(String)
A required host capability (git version, CGI binary) is absent or the feature is not compiled (501).
Git(GitError)
Underlying git porcelain/CGI error — status mapped from the inner
solid_pod_rs_git::error::GitError.
Io(Error)
Filesystem or process I/O failure (500).
Serde(Error)
JSON (de)serialisation failure for the spine (500).
Backend(String)
A generic backend failure (500).
Implementations§
Source§impl ForgeError
impl ForgeError
Sourcepub fn status_code(&self) -> u16
pub fn status_code(&self) -> u16
Recommended HTTP status code.
Sourcepub fn to_response(&self) -> ForgeResponse
pub fn to_response(&self) -> ForgeResponse
Render this error as a crate::ForgeResponse JSON body.
Trait Implementations§
Source§impl Debug for ForgeError
impl Debug for ForgeError
Source§impl Display for ForgeError
impl Display for ForgeError
Source§impl Error for ForgeError
impl Error for ForgeError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()