NewWe open-sourced 50+ Laravel packages
Custom AI apps, agents and automation — Roundly ConsultingRoundly
All packages

Every domain exception extends WorkflowsException (a RuntimeException) with errorCode(): string, status(): int and context(): array — the code plus the definition key, node or instance where known, what Laravel’s logger adds to a report; never a payload or a secret. Messages are translated (en, sk) and name keys, node ids and basenames, never a PHP class:

ExceptionerrorCode()status()Thrown when
UnknownDefinitionExceptionunknown_definition404No definition with the key in this scope (the message names the scope), or no webhook definition with that hook id.
NoVersionExceptionno_version404A dry run or export of a definition with no version yet, or a missing version number.
SubjectOwnerMismatchExceptionsubject_owner_mismatch404The subject belongs to another owner (never confirms existence).
DefinitionNotActiveExceptiondefinition_not_active409A start of a retired definition.
DefinitionKeyTakenExceptiondefinition_key_taken / definition_key_trashed409The key is taken for this owner (also by a soft-deleted definition: restore it).
DraftConflictExceptiondraft_conflict409edit() with a stale $expectedChecksum.
NothingToPublishExceptionnothing_to_publish409publish() without a draft.
PublishedVersionImmutableExceptionpublished_version_immutable409A write to a frozen column of a published version.
TriggerMismatchExceptiontrigger_mismatch409A start path that doesn’t match the version’s trigger (start() on a non-manual definition).
InstanceNotRetryableExceptioninstance_not_retryable409Retry of an instance that isn’t failed on a step.
InstanceNotCancellableExceptioninstance_not_cancellable409Cancel of a terminal instance.
InvalidGraphExceptioninvalid_graph422Publish (or a draft save) of an invalid graph; validationReport(); the message lists the first three problems.
InvalidTriggerInputExceptioninvalid_trigger_input422Manual input fails validation; errors().
InvalidDefinitionExceptioninvalid_definition_key / definition_needs_subject422A key outside ^[a-z0-9][a-z0-9._-]{0,99}$; a start without the subject the definition needs.
InvalidEventKeyExceptioninvalid_event_key422An emitted key outside the pattern, or an internal @ key.
InvalidTemplateExceptioninvalid_template422An import payload that isn’t a valid template.
InvalidDiffExceptioninvalid_diff422A diff of versions of two different definitions.
MissingIdempotencyKeyExceptionmissing_idempotency_key422A webhook start whose key source is empty.
MissingTriggeringUserExceptionmissing_triggering_user422An on_behalf_of start without a user.
SubjectTypeMismatchExceptionsubject_type_mismatch422A subject of another registered type than the definition’s.
UnknownSubjectTypeExceptionunknown_subject_type / unregistered_subject_model422An unknown subject type key (suggests the closest); a model with no registered type.
UnknownStepTypeExceptionunknown_step_type422An unknown step type (suggests the closest, or names the package a bridged type needs).
UnknownCalendarExceptionunknown_calendar422An unknown calendar (suggests the closest).
BusinessCalendarNeverOpenExceptioncalendar_never_open422No open time within the search window.
StepAuthorizationDeniedExceptionauthorization_denied403The authorization hook refused (the policy’s message, if any).
DuplicateStepTypeExceptionduplicate_step_type500Another class registers an existing step key.
InvalidStepTypeExceptioninvalid_step_key / unsupported_schema_keyword / invalid_schema_pattern / not_a_step_type500A step type that can’t be registered.

InvalidWorkflowsConfigurationException (every configuration error) extends the toolkit’s PackageToolkitException, not WorkflowsException: it is a programming error, not an HTTP answer. Handlers throw Steps\StepFailedException (permanent) and Steps\RetryableStepException (retried). Inside a step, any WorkflowsException fails the step permanently with its own error code.

Show your open-source love

This package is free and MIT-licensed. If it saves you time, a one-off donation or a Patreon membership keeps it maintained, tested and documented.

More ways to support, including crypto

By donating, you agree to our donation terms.

Want this built into your product?

We integrate our packages into custom Laravel and AI builds. Tell us what you're working on and we'll reply within 48 hours.