Error reference

August 25, 2026 · View on GitHub

The Honua JS SDK exposes a tagged error envelope from @honua/sdk-js. Public errors migrated in the table below pass the cross-realm isHonuaError(error) guard. Use their stable classifications to gate retry, refresh, fallback, and surface-to-user decisions instead of parsing message strings.

This release covers core transport/auth/protocol errors, discovery, the query planner, every public error exported by the stable map and runtime subpaths, the public realtime resume error, and the offline region plus replica synchronization classes migrated by #569, plus the plugin registry error migrated by #571, and the stable agent-tools/agent-safety errors plus the deprecated generated-app error migrated by #570. The experimental nl-map-control domain's error class remains an explicit residual pending a scoped migration; other experimental domains likewise retain their current domain-specific contracts until a scoped migration lands.

Envelope contract

Every migrated instance has these common fields:

FieldMeaning
kindConstant "honua.sdk.error.v1" tag used by the cross-realm guard.
domainStable broad owner: core, discovery, query, map, runtime, realtime, offline, plugin, agent, or app.
sdkCodeGlobally unique code from HONUA_ERROR_CODE_REGISTRY.
categoryStable authentication, cancellation, capability, internal, network, protocol, timeout, or validation classification.
retryableStable boolean for this exact sdkCode. This metadata describes the existing policy; it does not initiate retries.
operationId / requestIdOptional sanitized correlation identifiers when the throwing boundary has them.
contextFrozen, recursively sanitized structured context.
causeOriginal cause, retained on the in-process instance for debugging.

Existing error-specific .code values remain compatible. For example, HonuaGrpcError.code is still the numeric gRPC status and HonuaDiscoveryError.code is still "invalid-endpoint" (or another legacy discovery code). Use .sdkCode when one globally unique value is required. serializeHonuaError(error) projects .sdkCode as the serialized envelope's .code.

Serialization is deliberately fail-closed. serializeHonuaError and JSON.stringify(error) include classification, identifiers, sanitized context, and classification-only cause information. They omit raw messages, stacks, response bodies, details, cause payloads, credentials, authorization/cookie headers, cached feature bodies, raw cursors/resume tokens, signed URL values, query/filter/SQL values, local storage paths, plugin manifests/configuration, tool payloads, cleanup failures, binary payloads, and prototype-manipulation keys. Agent-domain errors additionally never serialize prompts, plans, tool arguments/results, feature values, approvals, or execution receipts — only fixed reason codes and, for HonuaAgentToolError, the invoked tool name. The raw instance still retains its message, documented detail fields, exact cause, and documented cleanup aggregates for local use.

import { isHonuaError, serializeHonuaError } from "@honua/sdk-js";

try {
  await operation();
} catch (error) {
  if (!isHonuaError(error)) throw error;
  console.error(serializeHonuaError(error));
  if (error.category === "cancellation") return;
  if (error.retryable) scheduleRetry();
}

At-a-glance table

ClassSourceWhen it firesRecover by
HonuaHttpErrorAny REST callThe server returned a non-2xx status with a parsed error envelope (4xx or 5xx).Branch on .statusCode: 401/403 → refresh credentials or surface to user; 404 → treat as missing; 409 → conflict, refetch and retry; 429 → respect Retry-After; 5xx → use the SDK's retry option or back off and retry idempotent calls.
HonuaTimeoutErrorAny REST callThe timeoutMs configured on the client elapsed before the response arrived.Increase timeoutMs per-call (the per-request AbortSignal is independent), or surface a "server slow" indicator. The request is idempotent-safe to retry.
HonuaNetworkErrorAny REST callThe transport itself failed (fetch rejected) — DNS, TLS, offline, or upstream connection reset.Inspect .cause if present; back off and retry. For browsers, this is also the most common error to render as "Check your connection."
HonuaAbortErrorAny REST callThe caller's AbortSignal was aborted (or the SDK aborted on timeout — see HonuaTimeoutError for that case).Do not retry. The caller asked to stop. Treat as a successful cancellation.
HonuaGrpcErrortransport: "grpc-web" onlyA gRPC-Web call returned a non-OK Code.Branch on .code (Connect/google.rpc.Code): UNAUTHENTICATED → refresh credentials, PERMISSION_DENIED → surface; UNAVAILABLE → retry with backoff (a configured retry already replays this class on unary calls — see Retry policy); DEADLINE_EXCEEDED → increase deadline or retry; INVALID_ARGUMENT → fix the call site.
HonuaAuthError@honua/sdk-js/auth providers (oauth2, clientCredentials)A credential could not be produced.Branch on .code: interaction_required → start interactive sign-in (auth.signIn()); refresh_failed → transient token-endpoint failure, retry later; invalid_grant → refresh token/authorization code expired or revoked (the stored credential is cleared) → interactive sign-in. The underlying transport/parse failure, when present, is on .cause.
HonuaCapabilityNotSupportedErrorSource.query / Source.applyEdits / etc.Under the default capabilityPolicy: "strict", the active source does not support the requested operation (e.g. query() on a wmts source).Either downgrade the request (drop the unsupported clause), fall back to Source.protocol(...) for raw protocol access, or set capabilityPolicy: "degraded" on createDataset to coerce best-effort behavior with a degraded reason in the Result.
HonuaDiscoveryErrorconnect, discovery truth, cache identityEndpoint metadata, protocol hints, source selection, or cached discovery observations are invalid or ambiguous.Branch on .code: provide an explicit supported protocol for ambiguous-protocol; select a listed source ID for ambiguous-source; use a reviewed adapter for unsupported-protocol; evict/rebuild entries for invalid-discovery-cache. Do not retry unchanged invalid input.
HonuaGeometryErrorSpatial-filter buildersGeometry classification would otherwise require guessing, or a recognized Esri geometry is malformed.Branch on .code: unknown-geometry means no supported Esri shape discriminator was found; malformed-geometry means a recognized shape, coordinate, or envelope expansion is invalid. Fix the input; do not retry it unchanged. Diagnostic context is on .detail.
HonuaExplorationContextError@honua/sdk-js/explorationAn exploration intent referenced a missing slice / view, or the snapshot is incompatible with the active context schema.Surface to user (UI bug) or migrate the saved snapshot. Do not retry.
HonuaWfsExceptionErrorwfs adapterThe WFS server returned a <ows:ExceptionReport>. The exceptionCode, optional locator, and formatted exception message are preserved on the instance.Branch on .exceptionCode (InvalidParameterValue, OperationNotSupported, MissingParameterValue, etc.). Most are caller bugs; surface to user.
HonuaWfsProtocolErrorWFS protocol moduleBound WFS 2.0 capability evidence, paging progress, or a GeoJSON feature response was invalid.Branch on .reason: fix/reconfigure invalid capability evidence or response shape; investigate a server paging bug for paging-stalled. Do not retry unchanged evidence.
HonuaJobFailedErrorOGC Processes / geoprocessing job pollingAn async job (IJobRun.results()) reached a non-success terminal state (failed / dismissed). The terminal .status, .errorCode, and .details are preserved on the instance.Branch on .status / .errorCode. Usually a server-side or input error; surface to user. Do not blindly retry.
HonuaQueryPlanningError / HonuaQueryPlanExecutionError@honua/sdk-js/query-plannerQuery validation/compilation/planning or accepted-plan execution fails.Branch on the existing short .code; fix validation/context errors or choose a supported capability/fallback.
HonuaMapLibreSourceAdapterErrorRoot or @honua/sdk-js/map source workflowSource projection, plan compatibility, identifier conflict, lifecycle, or renderer mutation fails.Branch on the existing short .code; recreate disposed mounts and correct conflicts/options before retrying.
HonuaDataToMapBridgeError@honua/sdk-js/mapThe high-level bridge rejects options, renderer capabilities, conflicts, lifecycle, or mutation.Correct options/host capability or recreate the mount.
HonuaAutomaticMapLibreStrategyError@honua/sdk-js/mapAutomatic strategy selection/mounting has no exact candidate, a stale plan, conflict, cancellation, disposal, or renderer failure.Re-explain stale plans; treat cancellation as terminal; correct host conflicts/capabilities.
HonuaMapLibreRasterStrategyError@honua/sdk-js/mapRaster strategy capability/metadata/options, identifiers, or renderer mutation fail.Correct source truth/options or host conflicts; do not silently select a lossy fallback.
HonuaAutomaticMapLibreIntegrationError@honua/sdk-js/mapIncremental integration is disposed or receives an invalid target.Recreate the integration or correct the target.
HonuaTemporalPlaybackError@honua/sdk-js/mapPlayback options or temporal extent are invalid.Correct input; do not retry unchanged input.
HonuaMapPackageError@honua/sdk-js/runtimeMap-package fetch/load/validation/update/style/source/view/popup/disposal stage fails.Branch on .stage; only fetch and disposal classifications are marked retryable.
HonuaRuntimeDiagnosticError@honua/sdk-js/runtimeRuntime style/source/layer validation produces error diagnostics.Inspect the local .diagnostics and correct invalid runtime input. Serialized context carries codes/count only.
QueryTileServerResponseError@honua/sdk-js/runtimeQuery-tile HTTP response is unsuccessful.Inspect .status; transient HTTP statuses are classified retryable without changing request policy.
HonuaRealtimeResumeError@honua/sdk-js/realtimeRealtime initialization, decoding, checkpoint, ordering, transport, or terminal delivery fails.Branch on the existing reason .code; reconnect or request a replacement snapshot only when the stream contract already permits it. Envelope retryability is metadata and does not initiate reconnects.
HonuaRealtimeReconciliationError@honua/sdk-js/realtime, @honua/sdk-js/mapDelta reconciliation (reconciliation.ts) or its MapLibre adapter (realtime-reconciliation-adapter.ts) receives an invalid option, or a reconciler/cache/adapter already disposed receives another patch.Branch on .code ("disposed" / "invalid-option"). Recreate the reconciler/cache/adapter instead of reusing a disposed one; correct the option that failed validation. Not retryable.
HonuaOfflineRegionError@honua/sdk-js/offlineOffline manifest validation, quota admission, resource loading, integrity verification, cancellation, atomic store work, or an offline read the persisted region cannot answer fails.Branch on the existing detailed .code. Rebuild invalid manifests, free quota, and treat abort as terminal. Treat cache-miss / scope-mismatch / out-of-region (offline.region.miss) as "download a region for this selection", never as an empty answer. Retry through the application's loader/store policy only when .sdkCode is offline.transport.transient; generic loader failures remain conservative. Raw resource identifiers and storage paths remain local-only.
HonuaReplicaSyncError@honua/app-platform/replica-sync (the deprecated @honua/sdk-js/replica-sync shim remains through 0.1.x)Disconnected replica capability, conflict review/resolution, permission, validation, or transport work fails.Branch on the existing detailed .code and preserve the current sync/conflict workflow. Only failures carrying a tagged retryable network/timeout cause receive retryable metadata; the envelope does not retry or resolve conflicts.
HonuaPluginRegistryError@honua/sdk-js/pluginPlugin registry validation, compatibility, policy, capability, activation, execution validation, cancellation, or cleanup fails.Branch on the existing PLUGIN_* .code or its grouped .sdkCode. Correct declarations or host policy/capability, treat cancellation as terminal, and inspect .cause / .cleanupErrors locally for activation or cleanup failures. No plugin classification is automatically retryable.
HonuaPmtilesLifecycleError@honua/sdk-js/pmtilesPMTiles archive/publish request validation, bounded response parsing, polling, terminal job state, signed access, or cleanup capability fails.Branch on .lifecycleCode; correct invalid input/response shape, re-publish expired signed access, treat cancellation as terminal, and use server TTL/overwrite policy when managed deletion is unavailable.
HonuaAgentToolError@honua/sdk-js/agent-toolsAn agent tool call names an unknown tool, the tool kit is created without a usable runtime, a selection target is not source-qualified, or the adapted runtime does not implement the requested tool method.Branch on .code or .sdkCode; correct the tool name, provide a runtime/controller/generated-app runtime, or qualify the selection. Not retryable.
HonuaAgentSafetyError@honua/sdk-js/agent-safetyAgent plan validation, policy evaluation, dry-run, approval, or safety-evidence derivation/verification fails (aborted, invalid input, policy denial, integrity failure, expired approval, context mismatch, or invalid signature).Branch on .code; correct the plan/policy/approval input, re-request approval, or treat cancellation as terminal. Not retryable.
HonuaAgentExecutionError@honua/sdk-js/agent-safetyA plan step's authorization, start audit, execution, receipt issuance, or terminal audit fails. Extends HonuaAgentSafetyError with .phase and, when execution reached that point, the signed .receipt.Branch on .code / .phase; the caller must consume .receipt directly (never serialized). Not retryable.
HonuaGeneratedAppError@honua/sdk-js/generated-app (deprecated shim; canonical home @honua/app-platform/generated-app)Generated-app preview/runtime manifest, projection, load, interaction, render, or dispose stage fails.Branch on .code / .stage; use toGeneratedAppDiagnostic(error) for the legacy {code, stage, message, detail} shape. Not retryable.

Registered code families

The exported HONUA_ERROR_CODE_REGISTRY is the canonical, typed inventory. Its object keys are globally unique at compile time, the common base accepts only registered codes, and domain constructors either reject unknown runtime reasons or project them to a fixed registered fallback. Focused entrypoints retain only the code/domain/category/retryability classifications needed by the error base; human-readable registry summaries remain in the explicit public registry. npm run check:error-codes verifies exact classification parity, registry shape, and this class/family documentation.

Public classRegistered sdkCode family
HonuaHttpErrorcore.http.transient, core.http.rejected
HonuaTimeoutErrorcore.timeout
HonuaNetworkErrorcore.network
HonuaAbortErrorcore.cancelled
HonuaGrpcErrorcore.grpc.transient, core.grpc.rejected
HonuaGeometryErrorcore.geometry.unknown-geometry, core.geometry.malformed-geometry
HonuaAuthErrorcore.auth.interaction-required, core.auth.refresh-failed, core.auth.invalid-grant
HonuaCapabilityNotSupportedErrorcore.capability-not-supported
HonuaExplorationContextErrorcore.exploration-context
HonuaWfsExceptionErrorcore.wfs-exception
HonuaJobFailedErrorcore.job-failed
HonuaWmsCapabilitiesParseErrorcore.wms-capabilities-parse
HonuaWmtsCapabilitiesParseErrorcore.wmts-capabilities-parse
HonuaDiscoveryErrordiscovery.* (the eight values in HonuaDiscoveryErrorCode)
HonuaQueryPlanningErrorquery.planning.* (the six values in QueryPlanningErrorCode)
HonuaQueryPlanExecutionErrorquery.execution.* (the eight values in QueryPlanExecutionErrorCode)
HonuaMapLibreSourceAdapterErrormap.source-adapter.*
HonuaDataToMapBridgeErrormap.data-bridge.*
HonuaAutomaticMapLibreStrategyErrormap.automatic-strategy.*
HonuaMapLibreRasterStrategyErrormap.raster-strategy.*
HonuaAutomaticMapLibreIntegrationErrormap.automatic-integration.*
HonuaTemporalPlaybackErrormap.temporal-playback.invalid-option
HonuaMapPackageErrorruntime.map-package.* (one code per public stage)
HonuaRuntimeDiagnosticErrorruntime.diagnostic
QueryTileServerResponseErrorruntime.query-tiles.transient, runtime.query-tiles.rejected
HonuaRealtimeResumeErrorrealtime.cancelled, realtime.transport.reconnectable, realtime.checkpoint.invalid, realtime.sequence.gap, realtime.protocol.terminal
HonuaRealtimeReconciliationErrorrealtime.reconciliation.disposed, realtime.reconciliation.invalid-option
HonuaOfflineRegionErroroffline.region.validation, offline.region.quota, offline.region.integrity, offline.region.miss, offline.cancelled, offline.transport.failure, offline.transport.transient, offline.storage.*
HonuaReplicaSyncErroroffline.replica-sync.capability, offline.replica-sync.validation, offline.replica-sync.permission-denied, offline.transport.failure, offline.transport.transient
HonuaPluginRegistryErrorplugin.registry.validation, plugin.compatibility, plugin.execution.policy-denied, plugin.capability-unavailable, plugin.lifecycle.activation, plugin.execution.validation, plugin.lifecycle.cleanup, plugin.cancelled, plugin.internal
HonuaPmtilesLifecycleErrorpmtiles.lifecycle.invalid-request, pmtiles.lifecycle.invalid-response, pmtiles.lifecycle.response-too-large, pmtiles.lifecycle.job-poll-timeout, pmtiles.lifecycle.job-failed, pmtiles.lifecycle.job-cancelled, pmtiles.lifecycle.access-url-expired, pmtiles.lifecycle.manual-cleanup-unsupported
HonuaAgentToolErroragent.tool.unknown-tool, agent.tool.missing-runtime, agent.tool.unqualified-selection, agent.tool.missing-runtime-method, agent.tool.internal
HonuaAgentSafetyErroragent.safety.aborted, agent.safety.invalid-input, agent.safety.policy-denied, agent.safety.integrity-failed, agent.safety.approval-expired, agent.safety.context-mismatch, agent.safety.signature-invalid, agent.safety.execution-failed, agent.safety.audit-failed, agent.safety.receipt-failed
HonuaAgentExecutionErroragent.safety.aborted, agent.safety.execution-failed, agent.safety.audit-failed, agent.safety.receipt-failed (subset of HonuaAgentSafetyError's family)
HonuaGeneratedAppErrorapp.unsupported-profile, app.unsupported-widget, app.missing-manifest, app.missing-manifest-artifact, app.missing-map-package, app.map-package-mismatch, app.missing-widget, app.missing-binding, app.map-load-failed, app.data-load-failed, app.render-failed, app.disposed

HonuaRealtimeResumeError.code remains the existing detailed reason (for example, invalid-checkpoint, sequence-gap, transport-gap, or delivery-failed). Its sdkCode groups those reasons into stable recovery classes. realtime.transport.reconnectable and realtime.sequence.gap are marked retryable because the existing contract permits reconnect or replacement snapshot recovery; the envelope does not perform either action. SSE abort, unsubscribe, and close still complete normally without emitting an error.

HonuaOfflineRegionError.code and HonuaReplicaSyncError.code likewise retain their detailed legacy reasons. Their grouped sdkCode values distinguish invalid state, quota/storage, cancellation, integrity, capability, permission, and transport recovery classes. Generic resource/replica transport failures are non-retryable by default; offline.transport.transient is selected only when the wrapped cause is itself a valid tagged, retryable network or timeout error. Raw cached content, sync cursors, signed URLs, filter values, resource locators, details, and filesystem paths are kept on the local error instance only; serialization emits a fixed registered reason and classification. Retryability is descriptive and does not alter offline eviction, commit, transport, or conflict-resolution policy.

HonuaPluginRegistryError.code remains the existing PLUGIN_* reason and cleanupErrors remains a frozen shallow copy of cleanup failures. The grouped sdkCode distinguishes registry validation, compatibility, host-policy denial, missing capability, activation, execution validation, cleanup, cancellation, and internal failures. Every plugin classification is conservatively non-retryable. Serialization emits only the registered classification and a fixed known reasonCode; it never emits manifests, plugin/configuration IDs, raw cause payloads, or cleanup payloads. Unknown runtime codes project to plugin.internal with reasonCode: "PLUGIN_UNKNOWN" without changing a valid string's local legacy .code or message.

HonuaAgentToolError.code remains the existing free-form reason string; unrecognized runtime values project to agent.tool.internal without changing the local .code or message. HonuaAgentSafetyError.code and HonuaAgentExecutionError.code remain the existing fixed AgentSafetyErrorCode reasons, each mapped one-to-one to a registered agent.safety.* sdkCode, so no information is lost by the grouping and no additional context is needed. HonuaGeneratedAppError.code/.stage/.detail remain the existing values; .detail stays local-only (never serialized as envelope context) because it is an open, caller-supplied bag. None of the four agent-domain classes ever place a prompt, plan, tool argument/result, feature value, approval, receipt, credential, or query value in serialized context — HonuaAgentToolError serializes only the invoked tool name (one of ten fixed identifiers); the others serialize no context at all, relying solely on the fixed sdkCode classification. The signed AgentExecutionReceiptV1 on HonuaAgentExecutionError.receipt is a local-only instance property, exactly like .cause, and is never copied into the envelope. Every agent/app classification is conservatively non-retryable.

Individual code registry

Registered codeDomainCategoryRetryableSummary
core.http.transientcoreprotocolyesRetryable HTTP response failure
core.http.rejectedcoreprotocolnoNon-retryable HTTP response failure
core.timeoutcoretimeoutyesRequest deadline elapsed
core.networkcorenetworkyesNetwork transport failure
core.cancelledcorecancellationnoCaller cancelled the operation
core.grpc.transientcoreprotocolyesRetryable gRPC-Web transport failure
core.grpc.rejectedcoreprotocolnoNon-retryable gRPC-Web transport failure
pmtiles.lifecycle.invalid-requestpmtilesvalidationnoPMTiles lifecycle request is invalid
pmtiles.lifecycle.invalid-responsepmtilesvalidationnoPMTiles lifecycle response violates the server contract
pmtiles.lifecycle.response-too-largepmtilesvalidationnoPMTiles lifecycle response exceeds its byte ceiling
pmtiles.lifecycle.job-poll-timeoutpmtilestimeoutyesPMTiles job did not reach a terminal state within polling bounds
pmtiles.lifecycle.job-failedpmtilesprotocolnoPMTiles job reached the failed state
pmtiles.lifecycle.job-cancelledpmtilescancellationnoPMTiles job reached the cancelled state
pmtiles.lifecycle.access-url-expiredpmtilesvalidationnoPublished PMTiles access URL is expired
pmtiles.lifecycle.manual-cleanup-unsupportedpmtilescapabilitynoManaged PMTiles artifact deletion is not exposed
core.geometry.unknown-geometrycorevalidationnoGeometry shape cannot be classified safely
core.geometry.malformed-geometrycorevalidationnoRecognized geometry has invalid coordinates or structure
core.auth.interaction-requiredcoreauthenticationnoInteractive authentication is required
core.auth.refresh-failedcoreauthenticationyesCredential refresh failed transiently
core.auth.invalid-grantcoreauthenticationnoAuthorization grant is invalid or expired
core.capability-not-supportedcorecapabilitynoRequested source capability is unavailable
core.exploration-contextcorevalidationnoExploration context operation is invalid
core.wfs-exceptioncoreprotocolnoWFS exception report
core.job-failedcoreprotocolnoRemote job reached a failed terminal state
core.wms-capabilities-parsecoreprotocolnoWMS capabilities document is invalid
core.wmts-capabilities-parsecoreprotocolnoWMTS capabilities document is invalid
core.coverage.invalid-requestcorevalidationnoCoverage request is invalid
core.coverage.invalid-responsecoreprotocolnoCoverage response is invalid
core.coverage.response-too-largecorevalidationnoCoverage response exceeds its byte limit
core.coverage.unsupported-formatcorecapabilitynoCoverage format is unsupported
core.coverage.service-errorcoreprotocolnoCoverage service rejected the request
core.coverage.wcs-exceptioncoreprotocolnoWCS exception report
core.zarr.invalid-requestcorevalidationnoZarr request is invalid
core.zarr.invalid-responsecoreprotocolnoZarr response is invalid
core.zarr.response-too-largecorevalidationnoZarr response exceeds its byte limit
core.zarr.metadata-pendingcorecapabilitynoZarr metadata scan is pending
core.zarr.missing-spatial-extentcorecapabilitynoZarr storage spatial extent is missing or unusable
core.zarr.no-tileable-variablecorecapabilitynoZarr metadata contains no tileable variable
core.zarr.missing-spatial-referencecorecapabilitynoZarr registration is missing a positive storage SRID for tile handoff
core.zarr.spatial-reference-mismatchcorecapabilitynoZarr storage and tile matrix spatial references do not match
core.zarr.unsupported-versioncorecapabilitynoZarr version is unsupported
core.zarr.unsupported-codeccorecapabilitynoZarr codec is unsupported
core.zarr.unsupported-dtypecorecapabilitynoZarr dtype is unsupported
core.zarr.ambiguous-dimensionscorevalidationnoZarr dimensions are ambiguous
core.zarr.service-errorcoreprotocolnoZarr service rejected the request
discovery.ambiguous-protocoldiscoveryvalidationnoMultiple protocols match the endpoint
discovery.ambiguous-sourcediscoveryvalidationnoMultiple sources match the selection
discovery.invalid-cloud-native-inputdiscoveryvalidationnoCloud-native discovery input is invalid or ambiguous
discovery.invalid-cloud-native-manifestdiscoveryvalidationnoCloud-native deployment manifest is invalid
discovery.invalid-endpointdiscoveryvalidationnoDiscovery endpoint is invalid
discovery.invalid-cache-identitydiscoveryvalidationnoDiscovery cache identity is invalid
discovery.invalid-discovery-cachediscoveryvalidationnoDiscovery cache entry is invalid
discovery.invalid-capabilitydiscoveryvalidationnoDiscovered capability evidence is invalid
discovery.cloud-native-operation-unavailablediscoverycapabilitynoCloud-native source operation is unavailable at its declared maturity
discovery.unsupported-protocoldiscoverycapabilitynoEndpoint protocol is unsupported
discovery.protocol-mismatchdiscoveryvalidationnoEndpoint protocol conflicts with its hint
query.planning.invalid-queryqueryvalidationnoQuery is invalid
query.planning.unsupported-compilerquerycapabilitynoNo compiler supports the source protocol
query.planning.unsupported-queryquerycapabilitynoQuery cannot be represented by the compiler
query.planning.capability-not-supportedquerycapabilitynoQuery requires an unavailable capability
query.planning.fallback-disabledquerycapabilitynoRequired local fallback is disabled
query.planning.unsafe-materializationqueryvalidationnoPlanned local materialization exceeds its safety bound
query.execution.invalid-planqueryvalidationnoQuery plan is invalid
query.execution.wfs-protocolqueryprotocolnoWFS protocol evidence or response is invalid
query.execution.plan-context-mismatchqueryvalidationnoExecution context does not match the accepted query plan
query.execution.unsafe-materializationqueryvalidationnoQuery execution exceeded its materialization bound
query.execution.invalid-resource-handlequeryvalidationnoQuery resource handle is invalid
query.execution.resource-unavailablequeryauthenticationnoQuery resource is unavailable in the authorization context
query.execution.resource-expiredqueryauthenticationnoQuery resource authorization has expired
query.execution.resource-resolution-failedqueryinternalnoQuery resource resolution failed
query.execution.resource-execution-failedqueryinternalnoResolved query resource execution failed
map.source-adapter.disposedmapvalidationnoMap source adapter is disposed
map.source-adapter.source-conflictmapvalidationnoMap source identifier already exists
map.source-adapter.layer-conflictmapvalidationnoMap layer identifier already exists
map.source-adapter.unsupported-planmapcapabilitynoQuery plan cannot be rendered by the source adapter
map.source-adapter.invalid-optionmapvalidationnoMap source adapter option is invalid
map.source-adapter.map-mutation-failedmapinternalnoRenderer mutation failed
map.data-bridge.invalid-optionmapvalidationnoData-to-map option is invalid
map.data-bridge.disposedmapvalidationnoData-to-map bridge is disposed
map.data-bridge.source-conflictmapvalidationnoData-to-map source identifier already exists
map.data-bridge.layer-conflictmapvalidationnoData-to-map layer identifier already exists
map.data-bridge.map-mutation-failedmapinternalnoData-to-map renderer mutation failed
map.data-bridge.interaction-unsupportedmapcapabilitynoRenderer interaction is unsupported
map.data-bridge.filter-unsupportedmapcapabilitynoRenderer filter mutation is unsupported
map.automatic-strategy.no-eligible-strategymapcapabilitynoNo exact map source strategy is eligible
map.automatic-strategy.stale-planmapvalidationnoMap strategy plan is stale
map.automatic-strategy.source-conflictmapvalidationnoAutomatic strategy source identifier already exists
map.automatic-strategy.layer-conflictmapvalidationnoAutomatic strategy layer identifier already exists
map.automatic-strategy.map-mutation-failedmapinternalnoAutomatic strategy renderer mutation failed
map.automatic-strategy.cancelledmapcancellationnoAutomatic map strategy was cancelled
map.automatic-strategy.disposedmapvalidationnoAutomatic map strategy is disposed
map.raster-strategy.unsupported-strategymapcapabilitynoRaster strategy is unsupported
map.raster-strategy.capability-mismatchmapcapabilitynoRaster source lacks a required capability
map.raster-strategy.missing-metadatamapvalidationnoRaster source metadata is incomplete
map.raster-strategy.invalid-optionmapvalidationnoRaster option is invalid
map.raster-strategy.source-conflictmapvalidationnoRaster source identifier already exists
map.raster-strategy.layer-conflictmapvalidationnoRaster layer identifier already exists
map.raster-strategy.map-mutation-failedmapinternalnoRaster renderer mutation failed
map.automatic-integration.disposedmapvalidationnoAutomatic map integration is disposed
map.automatic-integration.invalid-targetmapvalidationnoAutomatic map integration target is invalid
map.temporal-playback.invalid-optionmapvalidationnoTemporal playback option is invalid
runtime.map-package.fetchruntimenetworkyesMap package fetch failed
runtime.map-package.loadruntimeinternalnoMap package load failed
runtime.map-package.validateruntimevalidationnoMap package validation failed
runtime.map-package.exportruntimevalidationnoMap package export refused
runtime.map-package.importruntimevalidationnoMap package import refused
runtime.map-package.updateruntimeinternalnoMap package update failed
runtime.map-package.style-composeruntimevalidationnoMap package style composition failed
runtime.map-package.source-bindruntimeinternalnoMap package source binding failed
runtime.map-package.viewruntimeinternalnoRenderer view mutation failed
runtime.map-package.popupruntimevalidationnoPopup binding failed
runtime.map-package.disposeruntimeinternalyesRuntime disposal failed
runtime.diagnosticruntimevalidationnoRuntime validation diagnostic
runtime.query-tiles.transientruntimeprotocolyesRetryable query-tile response failure
runtime.query-tiles.rejectedruntimeprotocolnoNon-retryable query-tile response failure
realtime.cancelledrealtimecancellationnoRealtime operation was cancelled
realtime.transport.reconnectablerealtimenetworkyesRealtime transport can reconnect or resnapshot
realtime.checkpoint.invalidrealtimevalidationnoRealtime checkpoint or resume context is invalid
realtime.sequence.gaprealtimeprotocolyesRealtime ordering requires a replacement snapshot
realtime.protocol.terminalrealtimeprotocolnoRealtime delivery reached a terminal failure
realtime.reconciliation.disposedrealtimevalidationnoRealtime reconciliation controller, cache, or adapter is disposed
realtime.reconciliation.invalid-optionrealtimevalidationnoRealtime reconciliation option is invalid
offline.region.validationofflinevalidationnoOffline region input or lifecycle state is invalid
offline.region.quotaofflinevalidationnoOffline region exceeds a logical storage quota
offline.region.integrityofflineprotocolnoOffline resource integrity verification failed
offline.region.missofflinevalidationnoOffline region does not cover the requested read
offline.cancelledofflinecancellationnoOffline operation was cancelled
offline.transport.failureofflinenetworknoOffline resource or replica transport failed without a transient classification
offline.transport.transientofflinenetworkyesOffline resource or replica transport failed transiently
offline.storage.concurrentofflineinternalyesOffline storage inventory changed before commit
offline.storage.failureofflineinternalnoOffline storage operation failed
offline.replica-sync.capabilityofflinecapabilitynoReplica synchronization capability is unavailable
offline.replica-sync.validationofflinevalidationnoReplica synchronization request or state is invalid
offline.replica-sync.permission-deniedofflineauthenticationnoReplica synchronization permission was denied
plugin.registry.validationpluginvalidationnoPlugin registry input or lifecycle state is invalid
plugin.compatibilityplugincapabilitynoPlugin declaration is incompatible with the host or its dependencies
plugin.execution.policy-deniedplugincapabilitynoPlugin execution was denied by host policy
plugin.capability-unavailableplugincapabilitynoPlugin execution requires an unavailable capability or dependency
plugin.lifecycle.activationplugininternalnoPlugin activation or registration failed
plugin.execution.validationpluginvalidationnoPlugin execution input is invalid
plugin.lifecycle.cleanupplugininternalnoPlugin lifecycle cleanup failed
plugin.cancelledplugincancellationnoPlugin registration was cancelled
plugin.internalplugininternalnoPlugin registry internal failure
agent.tool.unknown-toolagentvalidationnoRequested agent tool name is not registered
agent.tool.missing-runtimeagentvalidationnoAgent tool kit requires a runtime, controller, or generated-app runtime
agent.tool.unqualified-selectionagentvalidationnoAgent tool selection target is not source-qualified
agent.tool.missing-runtime-methodagentcapabilitynoAdapted runtime does not implement the requested agent tool
agent.tool.internalagentinternalnoAgent tool executor internal failure
agent.safety.abortedagentcancellationnoAgent safety operation was aborted
agent.safety.invalid-inputagentvalidationnoAgent safety input is invalid
agent.safety.policy-deniedagentcapabilitynoAgent plan step was denied by host policy
agent.safety.integrity-failedagentprotocolnoAgent safety evidence integrity verification failed
agent.safety.approval-expiredagentauthenticationnoAgent step approval has expired
agent.safety.context-mismatchagentvalidationnoAgent execution context does not match the authorized plan
agent.safety.signature-invalidagentvalidationnoAgent approval or receipt signature is invalid
agent.safety.execution-failedagentinternalnoAgent plan step execution failed
agent.safety.audit-failedagentinternalnoAgent execution audit record could not be appended
agent.safety.receipt-failedagentinternalnoAgent execution receipt could not be issued or verified
app.unsupported-profileappcapabilitynoGenerated app profile is not supported
app.unsupported-widgetappcapabilitynoGenerated app widget kind is not supported
app.missing-manifestappvalidationnoGenerated app manifest or app package is missing
app.missing-manifest-artifactappvalidationnoGenerated app manifest artifact is missing
app.missing-map-packageappvalidationnoGenerated app map widget requires a MapPackage
app.map-package-mismatchappvalidationnoGenerated app MapPackage does not match its manifest
app.missing-widgetappvalidationnoGenerated app manifest is missing a required widget
app.missing-bindingappvalidationnoGenerated app runtime is missing a required binding
app.map-load-failedappinternalnoGenerated app map widget failed to load
app.data-load-failedappinternalnoGenerated app feature data failed to load
app.render-failedappinternalnoGenerated app render failed
app.disposedappvalidationnoGenerated app runtime is disposed
app.export-unsafeappvalidationnoComponent export refused because the artifact could not be proven credential-free
app.export-failedappinternalnoComponent export adapter failed to produce an artifact

Narrowing in catch

Prefer the isHonuaError guard so unrelated exceptions (e.g. caller TypeErrors in callbacks) propagate normally:

import { HonuaHttpError, HonuaTimeoutError, HonuaCapabilityNotSupportedError, isHonuaError } from "@honua/sdk-js";

try {
  await dataset.source("parcels")!.queryAll({ pagination: { limit: 100 } });
} catch (error) {
  if (!isHonuaError(error)) throw error;

  if (error instanceof HonuaCapabilityNotSupportedError) {
    // expected for capability misses — fall back to a narrower query
    return fallbackQuery();
  }
  if (error instanceof HonuaHttpError && error.statusCode === 401) {
    await refreshCredentials();
    return retry();
  }
  if (error instanceof HonuaTimeoutError) {
    notifyUser("Server slow — try again in a moment.");
    return;
  }
  throw error;
}

Retry policy

The SDK's built-in retry (HonuaClientOptions.retry) automatically handles a subset of these errors when configured:

ErrorRetried by built-in retry?
HonuaHttpError with status in retryStatuses (default [429, 502, 503, 504])Yes — on replay-safe methods only (GET / HEAD / PUT / DELETE)
HonuaNetworkErrorYes
HonuaTimeoutErrorYes
HonuaGrpcError with a transient code (4 / 8 / 10 / 14deadline_exceeded, resource_exhausted, aborted, unavailable)Yes — replay-safe unary calls only, using the same backoff/jitter and retry-after handling as REST. Server-streaming calls are never retried (a stream cannot be safely replayed mid-iteration), and no attempt is made once the call's abort/timeoutMs deadline has fired.
HonuaAuthErrorNo — resolved by the auth provider's own silent-refresh / single-flight logic; a 401/403 additionally triggers one force-refresh + replay. Branch on .code to sign in or surface.
HonuaAbortErrorNo — caller asked to stop
HonuaRealtimeResumeErrorNo automatic retry — the realtime transport and resumable delivery gate retain their existing reconnect/resnapshot policy; use .sdkCode only to classify the observed transition.
HonuaOfflineRegionErrorNo automatic retry — loader, transaction, quota, and eviction behavior is unchanged; the application/store owns any retry after an explicitly transient tagged cause.
HonuaReplicaSyncErrorNo automatic retry — the replica transport and conflict workflow retain their existing policy; generic transport failures remain non-retryable.
HonuaPluginRegistryErrorNo automatic retry — every plugin classification is conservatively non-retryable; the host must correct registry input, compatibility, policy, capability, or lifecycle state explicitly.
HonuaCapabilityNotSupportedErrorNo — would never succeed
HonuaGeometryErrorNo — input must be corrected
HonuaWfsExceptionErrorNo — caller bug
HonuaExplorationContextErrorNo — state bug
HonuaAgentToolErrorNo — caller/config bug
HonuaAgentSafetyError / HonuaAgentExecutionErrorNo automatic retry — every agent-safety classification is conservatively non-retryable; the host must correct plan/policy/approval input or re-request approval explicitly.
HonuaGeneratedAppErrorNo automatic retry — manifest/projection/load/render diagnostics are surfaced for the embedder to correct or retry explicitly.

Retry defaults are narrower than the retryable classification

Two HTTP status sets exist, and they are deliberately different:

SetValueRole
Retry-loop default (DEFAULT_RETRY_STATUSES in src/core/request-pipeline.ts)429, 502, 503, 504The statuses the opt-in retry loop replays when retry is configured and no retryStatuses override is supplied.
Transient classification (core.http.transient, and runtime.query-tiles.transient for query tiles)408, 429, 500, 502, 503, 504The statuses whose error instance carries retryable: true metadata.

The loop default is the narrower set on purpose: 429, 502, 503, and 504 all carry an explicit "this exact request may succeed if sent again" signal (and frequently a Retry-After header). 408 and 500 are classified transient so triage and telemetry can group them with the recoverable failures, but they are not replayed automatically — a 500 is an unexplained server fault that a blind replay usually just reproduces, and a 408 normally means the request was never fully received. Applications that want the broader set opt in explicitly, e.g. retry: { maxRetries: 2, retryStatuses: [408, 429, 500, 502, 503, 504] }.

The registry's retryable metadata does not drive the retry loop. The loop reads only the configured retryStatuses (or the default above), the replay-safe method gate, and the transient network/timeout error types; the classification is descriptive metadata for callers that implement their own backoff. Changing an sdkCode's retryable flag therefore changes reporting, not request behavior.

Capability policy

createDataset({ capabilityPolicy: "strict" }) is the default and is recommended for production. It surfaces capability misses as HonuaCapabilityNotSupportedError before the network call, so unsupported features can never silently degrade to an empty result. capabilityPolicy: "degraded" is intended for exploratory tools that prefer best-effort results with an explicit degraded reason annotated on the Result.