MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / code_name

Function code_name

libatomic/src/daemon/state.rs:391–422  ·  view source on GitHub ↗
(code: ErrorCode)

Source from the content-addressed store, hash-verified

389pub fn domain_status(code: ErrorCode, message: impl Into<String>) -> Status {
390 let message: String = message.into();
391 fn code_name(code: ErrorCode) -> &'static str {
392 match code {
393 ErrorCode::Unspecified => "ERROR_CODE_UNSPECIFIED",
394 ErrorCode::CapabilityUnavailable => "CAPABILITY_UNAVAILABLE",
395 ErrorCode::ProtocolVersionMismatch => "PROTOCOL_VERSION_MISMATCH",
396 ErrorCode::WorkspaceRequired => "WORKSPACE_REQUIRED",
397 ErrorCode::Unauthorized => "UNAUTHORIZED",
398 ErrorCode::Forbidden => "FORBIDDEN",
399 ErrorCode::SandboxToken => "SANDBOX_TOKEN",
400 ErrorCode::IdempotencyMismatch => "IDEMPOTENCY_MISMATCH",
401 ErrorCode::PreconditionFailed => "PRECONDITION_FAILED",
402 ErrorCode::GenerationConflict => "GENERATION_CONFLICT",
403 ErrorCode::InvalidArgument => "INVALID_ARGUMENT",
404 ErrorCode::NotFound => "NOT_FOUND",
405 ErrorCode::Repository => "REPOSITORY",
406 ErrorCode::RepositoryNotFound => "REPOSITORY_NOT_FOUND",
407 ErrorCode::ResourceExhausted => "RESOURCE_EXHAUSTED",
408 ErrorCode::RateLimited => "RATE_LIMITED",
409 ErrorCode::View => "VIEW",
410 ErrorCode::ViewStale => "VIEW_STALE",
411 ErrorCode::ChangeRejected => "CHANGE_REJECTED",
412 ErrorCode::ProvenanceStore => "PROVENANCE_STORE",
413 ErrorCode::ProvenanceCheckpoint => "PROVENANCE_CHECKPOINT",
414 ErrorCode::ProvenanceLifecycle => "PROVENANCE_LIFECYCLE",
415 ErrorCode::Provenance => "PROVENANCE",
416 ErrorCode::Changes => "CHANGES",
417 ErrorCode::FileStates => "FILE_STATES",
418 ErrorCode::Materialize => "MATERIALIZE",
419 ErrorCode::Remote => "REMOTE",
420 ErrorCode::Internal => "INTERNAL",
421 }
422 }
423 let info = ErrorInfo {
424 code: code as i32,
425 message: message.clone(),

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected