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

Function auth_status

libatomic/src/local.rs:425–433  ·  view source on GitHub ↗
(error: auth::AuthError)

Source from the content-addressed store, hash-verified

423}
424
425fn auth_status(error: auth::AuthError) -> Status {
426 match error {
427 auth::AuthError::Internal(error) => Status::internal(error.to_string()),
428 auth::AuthError::AuthenticationFailed { remote } => {
429 Status::unauthenticated(format!("authentication failed for {remote}"))
430 }
431 auth::AuthError::DelegationError { message } => Status::permission_denied(message),
432 }
433}
434
435fn require_repository(reference: &Option<crate::proto::RepositoryRef>) -> Result<(), Status> {
436 if reference.is_none() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected