Skip to content
AggregaAggrega
Select language: English

Aggrega Wasm Host-Function Error Codes schema

Generated reference. Do not edit by hand — regenerate from the published JSON Schema.

Schema id: https://aggrega.ai/schemas/wasm-hostfunc-error-v1beta1.schema.json

The closed set of machine-matchable error codes the host sets on a host-function reply envelope when a callback fails, beside the human-readable message. The code is a stable, machine-matchable identity a guest branches on without parsing the message text; the message stays free-form prose for humans. This schema is the single source of the code vocabulary shared across every host-function reply envelope (aggrega_pack_source, aggrega_read_source_file, aggrega_parse_source and aggrega_fetch_external_input): each envelope carries an optional hostfunc_error_code string set on failure and absent on success. That key names this catalog and only this catalog: the identifiers a guest reports for a halting condition it raised travel on a socket output under condition_code and condition_short_code, which are a different vocabulary, so a reader can tell from the key alone which set a value is drawn from. A guest tolerates an absent code (older host: fall back to the message) and an unrecognized code (newer host emits a code this guest predates: treat as no specific identity, fall back to the message). The object this schema declares, holding the vocabulary under code, travels on no wire: its values reach a guest only as a reply envelope’s hostfunc_error_code, and each plugin kit re-exports them as constants.

Top-level type: object

Properties

PropertyTypeRequiredDescription
codestring (enum)noThe machine-matchable failure identity, in lowercase-snake wire tokens. fetch_request_unreadable: the fetch-external-input URL could not be read from guest memory. fetch_input_unavailable: no external-input service is bound in this context. fetch_failed: the external-input fetch failed. request_unreadable: the request payload could not be read from guest memory. request_undecodable: the request payload could not be decoded. source_root_unavailable: no source root is bound in this context. source_read_failed: a file, directory, or subtree under the source root could not be read. unknown_selection_op: the pack selection named an operation the host does not recognize. source_escape: the requested relative path climbed above the source root and was rejected; the judgement is made on that relative path itself, so a climb is refused even where joining it would have landed back inside the root. producer_consumption_reentry: a producer-consumption callback was denied because it re-entered beyond the permitted depth. no_source_parser: no source parser is bound in this context. no_parser_for_format: no parser is registered for the requested format. parse_failed: the resolved parser failed to parse the source. Allowed values: "fetch_request_unreadable", "fetch_input_unavailable", "fetch_failed", "request_unreadable", "request_undecodable", "source_root_unavailable", "source_read_failed", "unknown_selection_op", "source_escape", "producer_consumption_reentry", "no_source_parser", "no_parser_for_format", "parse_failed"

Additional properties are not permitted.