pub enum ErrorCode {
Show 90 variants
InvalidArgument,
InvalidHash,
ConfigurationError,
Unsupported,
RepoNotFound,
RepoAlreadyExists,
RepoLocked,
NoCommits,
NoEdits,
BranchNotFound,
BranchAlreadyExists,
BranchClosed,
BranchIsServerOnly,
CommitNotFound,
BlobNotFound,
ManifestNotFound,
GroupNotFound,
RestrictedContent,
DiskFull,
IoError,
DatabaseError,
SerializationError,
GitError,
DirtyWorktree,
InterruptedWorktreeUpdate,
PathOutsideView,
LocalChangesWouldBeOverwritten,
WorktreeCaptureRaced,
CapturedBlobIntegrity,
CapturedTreeIntegrity,
ChangeCaptureNotFound,
ChangeCaptureIntegrity,
CaptureScopeExcluded,
ConflictDetected,
MergeInProgress,
NoMergeInProgress,
NoSyncInProgress,
MergeFailed,
MergeInvariantViolation,
MergePredictionUncertified,
LocalCommitsNotInRemoteHistory,
RemoteCommitsNotInLocalHistory,
IncompleteAncestry,
IncompleteManifestData,
IncompleteCommitData,
IncompleteBlobData,
NoVerifiedCommonAncestor,
RemoteError,
RemoteMoved,
RemoteRepoNotFound,
RemoteRepoAlreadyExists,
AuthRequired,
AuthDenied,
PublicationUnconfirmed,
PushCapabilityUnavailable,
IntegrityInconclusive,
IntegrityAdmissionBusy,
CloneAdmissionTokenTooLarge,
FinishPreflightFailed,
FinishPhaseFailed,
CommitPhaseFailed,
DescriptionStale,
ApprovalsRequired,
ApprovalRefused,
ReviewKeyRequired,
BranchMoved,
SelfApproval,
NotAnOwner,
NothingToApprove,
BoundaryNotTouched,
BoundaryOutsideView,
ServiceAccount,
ApprovalInternal,
ApprovalNotFound,
View,
RootConflict,
PullRequired,
HeadMoved,
FeedbackTransitionPreflightFailed,
FeedbackTransitionUnavailable,
FeedbackTransitionUnconfirmed,
FeedbackTransitionRejected,
FeedbackTransitionOutputFailed,
FeedbackCapabilityRequestFailed,
FeedbackCapabilityUnauthorized,
FeedbackCapabilityUnavailable,
FeedbackCapabilityRedirect,
FeedbackCapabilityInvalid,
FeedbackCapabilityUnsupported,
RevisionConflict,
}Expand description
The closed set of error.code values a --json failure can carry.
Codes are append-only: a string, once shipped, is never renamed or
reused for a different condition. There is deliberately no generic
member (error, unknown): a new failure needs a new code here, and
the CLI’s one exhaustive OakError mapping (oak_cli::contract)
will not compile until it names one.
RemoteError is the only deliberately coarse member: a failure
reported by, or while talking to, the remote that has not been
classified further. Classified remote conditions (connection refused,
rate limited, not found, …) get their own entries.
Variants§
InvalidArgument
InvalidHash
ConfigurationError
Unsupported
RepoNotFound
RepoAlreadyExists
RepoLocked
NoCommits
NoEdits
BranchNotFound
BranchAlreadyExists
BranchClosed
BranchIsServerOnly
CommitNotFound
BlobNotFound
ManifestNotFound
GroupNotFound
RestrictedContent
DiskFull
IoError
DatabaseError
SerializationError
GitError
DirtyWorktree
InterruptedWorktreeUpdate
PathOutsideView
LocalChangesWouldBeOverwritten
WorktreeCaptureRaced
CapturedBlobIntegrity
CapturedTreeIntegrity
ChangeCaptureNotFound
ChangeCaptureIntegrity
CaptureScopeExcluded
ConflictDetected
MergeInProgress
NoMergeInProgress
NoSyncInProgress
MergeFailed
MergeInvariantViolation
MergePredictionUncertified
LocalCommitsNotInRemoteHistory
RemoteCommitsNotInLocalHistory
IncompleteAncestry
IncompleteManifestData
IncompleteCommitData
IncompleteBlobData
NoVerifiedCommonAncestor
RemoteError
RemoteMoved
RemoteRepoNotFound
RemoteRepoAlreadyExists
AuthRequired
AuthDenied
PublicationUnconfirmed
IntegrityInconclusive
IntegrityAdmissionBusy
CloneAdmissionTokenTooLarge
FinishPreflightFailed
FinishPhaseFailed
CommitPhaseFailed
DescriptionStale
ApprovalsRequired
ApprovalRefused
ReviewKeyRequired
BranchMoved
SelfApproval
NotAnOwner
NothingToApprove
BoundaryNotTouched
BoundaryOutsideView
ServiceAccount
ApprovalInternal
ApprovalNotFound
View
RootConflict
PullRequired
HeadMoved
FeedbackTransitionPreflightFailed
FeedbackTransitionUnconfirmed
FeedbackTransitionRejected
FeedbackTransitionOutputFailed
FeedbackCapabilityRequestFailed
FeedbackCapabilityRedirect
FeedbackCapabilityInvalid
FeedbackCapabilityUnsupported
RevisionConflict
Implementations§
Source§impl ErrorCode
impl ErrorCode
Sourcepub const APPROVAL_REASONS: &'static [ErrorCode]
pub const APPROVAL_REASONS: &'static [ErrorCode]
Every approval refusal reason this client knows.
Sourcepub fn from_approval_reason(reason: &str) -> Option<ErrorCode>
pub fn from_approval_reason(reason: &str) -> Option<ErrorCode>
The code for an approval refusal reason sent by the server
(oak-web api/approvals.rs) or raised by this client. Every reason
the server emits keeps its exact string; a reason from a newer server
is None and is reported as approval_refused plus server_code.
Trait Implementations§
impl Copy for ErrorCode
impl Eq for ErrorCode
Source§impl Ord for ErrorCode
impl Ord for ErrorCode
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for ErrorCode
impl PartialOrd for ErrorCode
impl StructuralPartialEq for ErrorCode
Auto Trait Implementations§
impl Forget for ErrorCode
impl Freeze for ErrorCode
impl Move for ErrorCode
impl RefUnwindSafe for ErrorCode
impl Send for ErrorCode
impl Sync for ErrorCode
impl Unpin for ErrorCode
impl UnsafeUnpin for ErrorCode
impl UnwindSafe for ErrorCode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more