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

Method error_response

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

Source from the content-addressed store, hash-verified

25
26impl ResponseError for AuthError {
27 fn error_response(&self) -> actix_web::HttpResponse {
28 HttpResponse::build(self.status_code())
29 .insert_header(ContentType::html())
30 .body(self.to_string())
31 }
32 fn status_code(&self) -> StatusCode {
33 match self {
34 Self::WrongCredentials => StatusCode::BAD_REQUEST,

Callers

nothing calls this directly

Calls 1

status_codeMethod · 0.45

Tested by

no test coverage detected