Flexweave
API Reference

Errors and Outcomes

Primitive errors, command errors, and explicit command outcomes.

Public primitive error:

  • CoreError

CoreError

VariantMeaning
MissingRequiredDataA required attached data value was absent.
InvalidObjectIdAn object id was invalid or not live.
ObjectIdAlreadyExistsExternal object id registration collided.
OutOfMemoryReserved primitive allocation failure category.

Common definition errors:

  • ability definition and registry errors
  • effect definition and registry errors
  • event channel definition errors
  • signal definition errors

Runtime command errors include activation, grant, commit, effect application, effect initialization, effect execution, lifecycle channel, and object-id failures.

Definition Errors

SurfaceError types
AbilityAbilityDefinitionError, AbilityDefinitionRegistryError
EffectEffectDefinitionError, EffectDefinitionRegistryError
LifecycleEventChannelDefinitionError
SignalSignalDefinitionError

Runtime Errors

SurfaceError types
AbilityAbilityBeginError, AbilityActivationError, AbilityGrantError, AbilityCommitError, AbilityEndError, AbilityRollbackError, AbilityError, RegisteredAbilityActivationError
EffectEffectApplicationError, EffectApplyError
LifecycleEventChannelError
IdentityCoreError

Command outcomes let callers distinguish successful command shapes without inspecting lifecycle facts. Examples include committed ability outcomes, ended/canceled/rollback outcomes, and effect application outcomes.

Command Outcomes

SurfaceOutcome types
AbilityAbilityCommitOutcome, AbilityEndOutcome, AbilityCancelOutcome, AbilityRollbackOutcome
EffectEffectApplyOutcome

Use command results for control flow. Use emitted facts for observation, adapters, logs, tests, or projections.

On this page