Failure

Resolution failed. Every variant carries a non-null DidResolutionMetadata.error, enforced by each variant's own init block (§4).

The check lives on each subtype rather than once here on Failure itself: Failure has no property of its own for resolutionMetadata — each subtype declares it independently as a data class constructor property — and a base-class init block runs before a derived data class's own constructor properties are assigned, so it would observe an uninitialized value if it tried to read an override from here instead.

Inheritors

Types

Link copied to clipboard
data class InvalidFormat(val did: String, val reason: String, val resolutionMetadata: DidResolutionMetadata = DidResolutionMetadata( error = DidResolutionError.invalidDid(reason), )) : DidResolutionResult.Failure

§4.4 step 1: the input does not conform to the DID syntax.

Link copied to clipboard
data class MethodNotRegistered(val method: String, val availableMethods: List<String> = emptyList(), val resolutionMetadata: DidResolutionMetadata = DidResolutionMetadata( error = DidResolutionError.methodNotSupported("DID method '$method' is not registered"), )) : DidResolutionResult.Failure

§4.4 step 2: the DID method is not supported by this resolver.

Link copied to clipboard
data class NotFound(val did: Did, val reason: String? = null, val resolutionMetadata: DidResolutionMetadata = DidResolutionMetadata( error = DidResolutionError.notFound(reason ?: "DID not found: ${did.value}"), )) : DidResolutionResult.Failure

§4.4: the DID does not exist.

Link copied to clipboard
data class OptionsError(val did: Did?, val reason: String, val errorType: String = DidErrorType.FEATURE_NOT_SUPPORTED, val resolutionMetadata: DidResolutionMetadata = DidResolutionMetadata( error = DidResolutionError.of(errorType, reason), )) : DidResolutionResult.Failure

§4.4 steps 3 and 4: a resolution option is unsupported or invalid, or the requested representation is not supported.

Link copied to clipboard
data class ResolutionError(val did: Did, val reason: String, val cause: Throwable? = null, val resolutionMetadata: DidResolutionMetadata = DidResolutionMetadata( error = DidResolutionError.internalError(reason), )) : DidResolutionResult.Failure

§4.4 final step: an unexpected error during resolution.

Properties

Link copied to clipboard

§4.3 document metadata; empty for failed resolutions, as §4 requires.

Link copied to clipboard

The resolved document, or null for deactivated and failed resolutions (§4).

Link copied to clipboard

The RFC 9457 error object, or null when resolution did not fail.

Link copied to clipboard

Human-readable failure text, or null when resolution did not fail.

Link copied to clipboard

The error type URI, or null when resolution did not fail.

Link copied to clipboard

True when resolution failed with an error. Deactivation is NOT an error.

Link copied to clipboard

True when the DID exists but is deactivated (§4.4).

Link copied to clipboard

True when the DID could not be found.

Link copied to clipboard

True when the DID resolved to a document.

Link copied to clipboard

§4.2 resolution metadata for any outcome.

Functions

Link copied to clipboard

Returns the resolved DidDocument or throws.