MCPcopy Create free account
hub / github.com/cosdata/cosdata / status_code

Method status_code

src/api/auth/error.rs:32–38  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

30 .body(self.to_string())
31 }
32 fn status_code(&self) -> StatusCode {
33 match self {
34 Self::WrongCredentials => StatusCode::BAD_REQUEST,
35 Self::InvalidToken => StatusCode::UNAUTHORIZED,
36 Self::FailedToExtractTokenFromRequest => StatusCode::INTERNAL_SERVER_ERROR,
37 }
38 }
39}

Callers 1

error_responseMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected