Skip to main content

ErrorCode

Enum ErrorCode 

Source
#[non_exhaustive]
pub enum ErrorCode {
Show 28 variants Schema, NumberTooLarge, CountsMissing, CountsInconsistent, AttachmentRefUnknown, AttachmentPathInvalid, MetricIdInvalid, ExtKeyInvalid, TypeMismatch, NotIndexed, UnknownPath, AttachmentMissing, LabelInUse, NamespaceInUse, RegistryEntryExists, RunsMoved, RunStatusDetail, RunIdInvalid, RunIdMismatch, RunResultValueOrLabel, RunResultsEvalUnknown, RunUnknown, RunNotInUsedSet, TooManyRunResults, RunDeleted, BatchDuplicateRunId, BatchTooLarge, BodyTooLarge,
}
Expand description

The closed set of error codes.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Schema

JSON Schema violation: unknown key, wrong type, missing required key.

§

NumberTooLarge

An integer outside ±2^53.

§

CountsMissing

results is non-empty but counts is absent.

§

CountsInconsistent

counts.attempted < completed + failed + skipped + errored.

§

AttachmentRefUnknown

A samples_ref, calls, artifacts[] or error.log entry names no attachments[].path.

§

AttachmentPathInvalid

An attachments[].path is duplicated, absolute, or contains ...

§

MetricIdInvalid

A results[].metric, a run_results[].metric or a key of a run’s metrics is not of the form {ns}/{name}.

§

ExtKeyInvalid

A key of ext, at the top level of a record or a run or inside one of its facets, is not of the form {ns}/{name}.

§

TypeMismatch

Query: operator applied to a path of another type.

§

NotIndexed

Query: operator needs an index the path does not have.

§

UnknownPath

Query: path not in the schema.

§

AttachmentMissing

An attachments[].sha256 has not been uploaded and confirmed.

§

LabelInUse

The requested @{label} already names another version.

§

NamespaceInUse

The requested organisation slug is already a user or an organisation.

§

RegistryEntryExists

A registry entry already exists at that address. Entries are immutable, so a correction is a new version.

§

RunsMoved

An evalhub.eval/2.0 Eval header carries runs, or the body declares evalhub.eval/1.0 (with or without runs). Runs are not part of the header; they are written one by one or in a batch.

§

RunStatusDetail

A run’s status and its detail disagree: error must be present exactly when status is error, skip_reason exactly when it is skipped.

§

RunIdInvalid

A run_id is empty, contains /, or is longer than 200 bytes.

§

RunIdMismatch

The run_id in the body differs from the one in the request path.

§

RunResultValueOrLabel

A run_results[] element has neither value nor label.

§

RunResultsEvalUnknown

A run_results[].eval is not the record of any of the Card’s core/uses_eval relations.

§

RunUnknown

A run_id in the Card’s used set has no row in that Eval (or the Eval is one the writer may not see).

§

RunNotInUsedSet

A run_results[].run_id is outside the Card’s used set for its eval.

§

TooManyRunResults

A Card version carries more run_results[] than the hub’s configured limit.

§

RunDeleted

The run_id names a run that was deleted. A deleted run’s id is not reused, because Cards that judged it would then point at different content.

§

BatchDuplicateRunId

The same run_id appears more than once in one batch.

§

BatchTooLarge

A batch carries more runs than the hub’s configured count.

§

BodyTooLarge

The request body is larger than the hub’s configured size in bytes.

Implementations§

Source§

impl ErrorCode

Source

pub const fn status(self) -> u16

The HTTP status this code is returned with.

Trait Implementations§

Source§

impl Clone for ErrorCode

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for ErrorCode

Source§

impl Debug for ErrorCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ErrorCode

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for ErrorCode

Source§

impl Hash for ErrorCode

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl JsonSchema for ErrorCode

Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn inline_schema() -> bool

Whether JSON Schemas generated for this type should be included directly in parent schemas, rather than being re-used where possible using the $ref keyword. Read more
Source§

impl PartialEq for ErrorCode

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for ErrorCode

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for ErrorCode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.