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

Method status_code

src/api/vectordb/versions/error.rs:35–42  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

33 }
34
35 fn status_code(&self) -> StatusCode {
36 match self {
37 Self::CollectionNotFound => StatusCode::NOT_FOUND,
38 Self::InvalidVersionHash => StatusCode::BAD_REQUEST,
39 Self::UpdateFailed(_) => StatusCode::BAD_REQUEST,
40 Self::DatabaseError(_) => StatusCode::INTERNAL_SERVER_ERROR,
41 }
42 }
43}
44
45impl From<WaCustomError> for VersionError {

Callers 1

error_responseMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected