Skip to main content

Slugs

Struct Slugs 

Source
pub struct Slugs {
Show 22 fields pub validation_failed: ProblemDef, pub captcha_failed: ProblemDef, pub invalid_token: ProblemDef, pub unknown_product: ProblemDef, pub unauthenticated: ProblemDef, pub admin_unauthorized: ProblemDef, pub api_key_unauthorized: ProblemDef, pub api_key_forbidden: ProblemDef, pub admin_forbidden: ProblemDef, pub sidecar_unauthorized: ProblemDef, pub not_production_ready: ProblemDef, pub request_too_large: ProblemDef, pub rate_limited: ProblemDef, pub allowance_exhausted: ProblemDef, pub not_found: ProblemDef, pub internal: ProblemDef, pub mail_not_configured: ProblemDef, pub not_ready: ProblemDef, pub unknown_tenant: ProblemDef, pub sidecar_unavailable: ProblemDef, pub sidecar_contract_mismatch: ProblemDef, pub tenant_degraded: ProblemDef,
}
Expand description

Every slug core emits. Keep sorted by status.

Fields§

§validation_failed: ProblemDef

400: a request body/query did not deserialize or failed validation.

§captcha_failed: ProblemDef

400: a captcha token was missing or rejected.

§invalid_token: ProblemDef

400: a signed link/token is malformed, tampered or expired.

§unknown_product: ProblemDef

400: the request named a resource outside the configured set (e.g. an unknown waitlist product).

§unauthenticated: ProblemDef

401: a credential was presented and did not verify, or none was presented where one is required. The one 401 for every unauthenticated caller — the auth-client bearer check, the tables API’s access decision and the modules reusing them all answer with it.

§admin_unauthorized: ProblemDef

401: admin endpoints are disabled (ADMIN_TOKEN unset) or the request carried no bearer token.

§api_key_unauthorized: ProblemDef

401: a developer API key was missing, malformed, unknown, revoked or failed its hash check — one uniform answer for all five, so a probe cannot tell which (issue #532).

§api_key_forbidden: ProblemDef

403: the presented API key is valid but lacks the scope the route requires (issue #532).

§admin_forbidden: ProblemDef

403: the presented admin token is wrong.

§sidecar_unauthorized: ProblemDef

401: a request reached a sidecar-guarded route (/v1/* or /__surface on a sidecar that requires it) without a valid gateway token from the trusted host (issue #131).

§not_production_ready: ProblemDef

503: the deployment declares production but cannot satisfy the abuse controls its own routes declare, so the guarded routes are refused rather than served unprotected (issue #143).

§request_too_large: ProblemDef

413: the request body exceeded the 64 KiB /v1/* limit.

§rate_limited: ProblemDef

429: the rate limit for this IP or address was exceeded.

§allowance_exhausted: ProblemDef

429: a metered allowance is spent for the current period (issue #588). A quota, not a throttle: the subject must wait for the period to roll over, which Retry-After names.

§not_found: ProblemDef

404: no route matched.

§internal: ProblemDef

500: unhandled error; body carries no internals.

§mail_not_configured: ProblemDef

503: the mailer is not configured (no API key / unverified sending domain); forms should degrade to a direct address.

§not_ready: ProblemDef

503: readiness probe failed (/__ready): database missing, slow or erroring.

§unknown_tenant: ProblemDef

404: the request’s host resolves to no tenant in the registry. A 404 and not a 403: which hosts are tenants is not a secret worth a distinguishable answer, and “no such tenant” is the truth (RECONCILIATION.md §6, TENANT-ROUTING.md §3).

§sidecar_unavailable: ProblemDef

503: a sidecar-mounted module could not be reached (ADR 0009). Only that prefix fails; every in-process module keeps serving.

§sidecar_contract_mismatch: ProblemDef

503: a sidecar answered with a different HARNESS_API than this harness speaks, so its responses cannot be trusted.

§tenant_degraded: ProblemDef

503: the request’s tenant is in the registry but degraded — its schema is behind or its database is unreachable, so serving it would read a shape the code no longer expects (RECONCILIATION.md §6, TENANT-ROUTING.md §3).

Auto Trait Implementations§

§

impl Freeze for Slugs

§

impl RefUnwindSafe for Slugs

§

impl Send for Slugs

§

impl Sync for Slugs

§

impl Unpin for Slugs

§

impl UnsafeUnpin for Slugs

§

impl UnwindSafe for Slugs

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Same for T

Source§

type Output = T

Should always be Self
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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more