انتقل إلى المحتوى الرئيسي

Variable: REFUSAL_CODES

const REFUSAL_CODES: object

Defined in: packages/contracts/src/refusal-codes.ts:109

The shared refusal codes.

subject.slug_taken and subject.slug_reserved are identity's (plan 3a, ruling 3 of "Rulings before 3.11b and 3.12", and ruling 4 of the wave 3 hand-out). A slug becomes a hostname label, <slug>.identity.<domain>, and a hostname label is a global name, so a slug is unique across the whole estate and may not be one of the platform's own labels (PLATFORM_HOST_LABELS). slug_taken says the name is in use and nothing about where: the organisation that holds it may be one the caller cannot read. That is as much as DNS says about any label.

The identifier.* codes are issuance's. identifier.host_unverified is the control rule for a delegated host (rulings 1 and 7 of the hand-out): at publication the host must resolve to this deployment's edge, and until it does nothing is signed or written. It is state on every operation that answers it, never validation: the request is not what is wrong, and the same request succeeds once the DNS record exists, so the caller fixes the record and publishes again. One code has one category; if the check is ever made at creation as well, wrong DNS is still a state. Its field names the member the host was given in at creation and is informational, as RefusalCodeDefinition.field says for every code that is not validation.

The codes from identifier.not_prepared to identifier.anchor_mismatch are what the prepare, preview, publish and update cycle answers (step 3.2d; ruling 18 of the wave 3 hand-out, which fixed each category). They read in four groups:

  • state: the identifier is not where the operation needs it. The caller reads it again and decides; repeating the request changes nothing;
  • internal: the platform's own fault (document_mismatch, agent_refused). Nothing was published, and the title says so without saying what the agent was asked;
  • upstream: something the module depends on did not answer or is not there yet (the agent, the registry, DNS, a placement, the deployment's own wiring). Nothing was lost. Most are worth a retry; not_configured is not, and the module says so in its reply's retryable, which is the module's to set and is not part of this list;
  • conflict: what is stored somewhere else disagrees with the request (registry_stale, anchor_mismatch), and writing regardless would replace it.

The last three (host_invalid, organization_inactive, identity_unavailable) are creation's, older than this list, and entered with ruling 23 of the hand-out so that every code issuance can answer has one home. host_invalid is validation with no field: the host it refuses is derived from the organisation's slug, which is no member of the request, so the gateway points it at the body as a whole.

None of them has a field: each is about the identifier the path names, never about a member of the request. The gateway titles a state or conflict problem from here; for internal and upstream it keeps its own generic problem, and the title is for a client that shows the code's meaning (the consoles' refusals catalogue takes its English from this list).

The framework.* codes are governance's publish-time checks of a version 2 governance framework (stage T2b of chapter 55), the rules its JSON Schema cannot state. All are validation: the document is what is wrong, and the same document is refused every time. framework.authority_did_mismatch (T2c) refuses a governingAuthority.did that is not the anchor's own did:webvh, which is the framework's DID. framework.authority_did_required is apart from the others because it is the one a correct draft meets: the DID is optional in the schema while the framework is drafted and the anchor's identifier is not yet minted, and required once it is published. Neither has a field yet: no HTTP route carries a framework today (the setup engine sends it over the broker), and the member it would sit in is the authoring route's to name. The reply's message names the place in the document.

Type Declaration​

framework.authority_did_mismatch​

readonly framework.authority_did_mismatch: object

framework.authority_did_mismatch.category​

readonly category: "validation" = 'validation'

framework.authority_did_mismatch.title​

readonly title: "This framework's DID is not the anchor's identifier" = "This framework's DID is not the anchor's identifier"

framework.authority_did_required​

readonly framework.authority_did_required: object

framework.authority_did_required.category​

readonly category: "validation" = 'validation'

framework.authority_did_required.title​

readonly title: "This framework cannot be published without its governing authority's DID" = "This framework cannot be published without its governing authority's DID"

framework.inconsistent​

readonly framework.inconsistent: object

framework.inconsistent.category​

readonly category: "validation" = 'validation'

framework.inconsistent.title​

readonly title: "This framework breaks a rule that spans its sections" = 'This framework breaks a rule that spans its sections'

identifier.agent_refused​

readonly identifier.agent_refused: object

identifier.agent_refused.category​

readonly category: "internal" = 'internal'

identifier.agent_refused.title​

readonly title: "The agent refused the request and nothing was published" = 'The agent refused the request and nothing was published'

identifier.agent_unavailable​

readonly identifier.agent_unavailable: object

identifier.agent_unavailable.category​

readonly category: "upstream" = 'upstream'

identifier.agent_unavailable.title​

readonly title: "The agent that holds the keys could not be reached" = 'The agent that holds the keys could not be reached'

identifier.anchor_mismatch​

readonly identifier.anchor_mismatch: object

identifier.anchor_mismatch.category​

readonly category: "conflict" = 'conflict'

identifier.anchor_mismatch.title​

readonly title: "The anchor already has an identifier that differs from the one requested" = 'The anchor already has an identifier that differs from the one requested'

identifier.cursor_invalid​

readonly identifier.cursor_invalid: object

identifier.cursor_invalid.category​

readonly category: "validation" = 'validation'

identifier.cursor_invalid.field​

readonly field: "query.cursor" = 'query.cursor'

identifier.cursor_invalid.title​

readonly title: "This cursor was not issued by this list" = 'This cursor was not issued by this list'

identifier.discard_pending​

readonly identifier.discard_pending: object

identifier.discard_pending.category​

readonly category: "upstream" = 'upstream'

identifier.discard_pending.title​

readonly title: "Keys from an earlier operation are still waiting to be destroyed" = 'Keys from an earlier operation are still waiting to be destroyed'

identifier.document_mismatch​

readonly identifier.document_mismatch: object

identifier.document_mismatch.category​

readonly category: "internal" = 'internal'

identifier.document_mismatch.title​

readonly title: "The signed document was not the document that was previewed" = 'The signed document was not the document that was previewed'

identifier.exists​

readonly identifier.exists: object

identifier.exists.category​

readonly category: "conflict" = 'conflict'

identifier.exists.title​

readonly title: "This organization already has an identifier" = 'This organization already has an identifier'

identifier.failed​

readonly identifier.failed: object

identifier.failed.category​

readonly category: "state" = 'state'

identifier.failed.title​

readonly title: "This identifier could not be published and is final" = 'This identifier could not be published and is final'

identifier.host_invalid​

readonly identifier.host_invalid: object

identifier.host_invalid.category​

readonly category: "validation" = 'validation'

identifier.host_invalid.title​

readonly title: "This host is not a hostname the platform can serve" = 'This host is not a hostname the platform can serve'

identifier.host_refused​

readonly identifier.host_refused: object

identifier.host_refused.category​

readonly category: "validation" = 'validation'

identifier.host_refused.field​

readonly field: "body.host" = 'body.host'

identifier.host_refused.title​

readonly title: "This host may not serve an identifier" = 'This host may not serve an identifier'

identifier.host_taken​

readonly identifier.host_taken: object

identifier.host_taken.category​

readonly category: "conflict" = 'conflict'

identifier.host_taken.title​

readonly title: "This host already serves another identifier" = 'This host already serves another identifier'

identifier.host_unverified​

readonly identifier.host_unverified: object

identifier.host_unverified.category​

readonly category: "state" = 'state'

identifier.host_unverified.field​

readonly field: "body.host" = 'body.host'

identifier.host_unverified.title​

readonly title: "This host does not resolve to the platform yet" = 'This host does not resolve to the platform yet'

identifier.identity_unavailable​

readonly identifier.identity_unavailable: object

identifier.identity_unavailable.category​

readonly category: "upstream" = 'upstream'

identifier.identity_unavailable.title​

readonly title: "The identity service did not answer" = 'The identity service did not answer'

identifier.method_not_permitted​

readonly identifier.method_not_permitted: object

identifier.method_not_permitted.category​

readonly category: "validation" = 'validation'

identifier.method_not_permitted.field​

readonly field: "body.method" = 'body.method'

identifier.method_not_permitted.title​

readonly title: "This method is not permitted here" = 'This method is not permitted here'

identifier.method_unsupported​

readonly identifier.method_unsupported: object

identifier.method_unsupported.category​

readonly category: "state" = 'state'

identifier.method_unsupported.title​

readonly title: "This platform version cannot publish an identifier of this method" = 'This platform version cannot publish an identifier of this method'

identifier.not_configured​

readonly identifier.not_configured: object

identifier.not_configured.category​

readonly category: "upstream" = 'upstream'

identifier.not_configured.title​

readonly title: "This deployment is not configured to publish identifiers" = 'This deployment is not configured to publish identifiers'

identifier.not_prepared​

readonly identifier.not_prepared: object

identifier.not_prepared.category​

readonly category: "state" = 'state'

identifier.not_prepared.title​

readonly title: "This identifier has no document waiting to be published" = 'This identifier has no document waiting to be published'

identifier.not_previewed​

readonly identifier.not_previewed: object

identifier.not_previewed.category​

readonly category: "state" = 'state'

identifier.not_previewed.title​

readonly title: "This document has not been previewed since it was last rendered" = 'This document has not been previewed since it was last rendered'

identifier.not_published​

readonly identifier.not_published: object

identifier.not_published.category​

readonly category: "state" = 'state'

identifier.not_published.title​

readonly title: "This identifier has not been published yet" = 'This identifier has not been published yet'

identifier.organization_inactive​

readonly identifier.organization_inactive: object

identifier.organization_inactive.category​

readonly category: "state" = 'state'

identifier.organization_inactive.title​

readonly title: "This organization is not active" = 'This organization is not active'

identifier.placement_pending​

readonly identifier.placement_pending: object

identifier.placement_pending.category​

readonly category: "upstream" = 'upstream'

identifier.placement_pending.title​

readonly title: "This identifier is waiting to be placed on an agent" = 'This identifier is waiting to be placed on an agent'

identifier.registry_stale​

readonly identifier.registry_stale: object

identifier.registry_stale.category​

readonly category: "conflict" = 'conflict'

identifier.registry_stale.title​

readonly title: "The registry holds something other than the last published version" = 'The registry holds something other than the last published version'

identifier.registry_unavailable​

readonly identifier.registry_unavailable: object

identifier.registry_unavailable.category​

readonly category: "upstream" = 'upstream'

identifier.registry_unavailable.title​

readonly title: "The registry could not be reached" = 'The registry could not be reached'

identifier.resolver_unavailable​

readonly identifier.resolver_unavailable: object

identifier.resolver_unavailable.category​

readonly category: "upstream" = 'upstream'

identifier.resolver_unavailable.title​

readonly title: "The host of this identifier could not be looked up" = 'The host of this identifier could not be looked up'

identifier.update_in_progress​

readonly identifier.update_in_progress: object

identifier.update_in_progress.category​

readonly category: "state" = 'state'

identifier.update_in_progress.title​

readonly title: "An update of this identifier is already waiting to be published" = 'An update of this identifier is already waiting to be published'

identifier.version_limit​

readonly identifier.version_limit: object

identifier.version_limit.category​

readonly category: "state" = 'state'

identifier.version_limit.title​

readonly title: "This identifier has reached the most versions it can have" = 'This identifier has reached the most versions it can have'

subject.slug_reserved​

readonly subject.slug_reserved: object

subject.slug_reserved.category​

readonly category: "validation" = 'validation'

subject.slug_reserved.field​

readonly field: "body.slug" = 'body.slug'

subject.slug_reserved.title​

readonly title: "This slug is reserved for the platform" = 'This slug is reserved for the platform'

subject.slug_taken​

readonly subject.slug_taken: object

subject.slug_taken.category​

readonly category: "conflict" = 'conflict'

subject.slug_taken.field​

readonly field: "body.slug" = 'body.slug'

subject.slug_taken.title​

readonly title: "This slug is already in use" = 'This slug is already in use'