Alternera.Plugin.Error (alternera_plugin_sdk v0.9.0)

Copy Markdown View Source

What a plugin needs to know about a step's failure before it raises one: the rule for an error type and the cap on a failed call's response body. The error itself, with the pipeline's own types and what the runner records, is Pipelines.Runner.Error, which takes both from here.

Summary

Functions

The most of a failed call's response body an error keeps (response's "body"): the tenant's body_inspect_max_bytes, at most 1 MiB.

Whether type is a valid error type: a slug of lowercase letters, digits, - and _, starting with a letter or digit, at most 64 characters.

Functions

max_body_bytes(inspect_max)

@spec max_body_bytes(pos_integer() | nil) :: pos_integer()

The most of a failed call's response body an error keeps (response's "body"): the tenant's body_inspect_max_bytes, at most 1 MiB.

valid_type?(type)

@spec valid_type?(term()) :: boolean()

Whether type is a valid error type: a slug of lowercase letters, digits, - and _, starting with a letter or digit, at most 64 characters.