Exceptions
All extend TicketsException (a RuntimeException); messages come from tickets::messages in English and Slovak. The HTTP column is what the API answers:
| Exception | Thrown when | HTTP |
|---|---|---|
TicketNotFoundException | An unknown or soft-deleted reference / key. | 404 |
TicketRecordNotFoundException | An unknown link, category, field or tag id — errorCode(): link_not_found, category_not_found, field_not_found, tag_not_found. | 404 |
TicketCommentNotFoundException | A comment not of this ticket. | 404 |
TicketAttachmentNotFoundException | Media not of this ticket. | 404 |
TicketAccessDeniedException | Someone who is no participant writes; anyone but an agent for the ticket posts a note. | 403 |
GuestAccessDeniedException | An invalid guest link; a link for a non-recipient. | 403 |
TicketClosedException | A message, edit or delete on a Closed ticket. | 409 |
TicketTrashedException | A mutation of a soft-deleted ticket. | 409 |
FieldTypeLockedException | Changing type or encryption, or dropping options, of a field in use. | 409 |
DuplicateTicketReferenceException | Two projects with the same prefix. | 409 |
FieldNotEditableException | An unknown key, or a field the requester may not edit — errorCode(): unknown_field / field_not_editable. | 422 |
UnknownTicketFieldException | whereField* on an unknown, encrypted or unfilterable key. | 422 |
UnknownTicketTransitionException | A named convenience the configured lifecycle lacks. | 422 |
UnknownMorphAliasException | An alias not on the allow-list, a class name, or a key no record has — errorCode(): unknown_requester_type, unknown_assignee_type, unknown_watcher_type, unknown_project_type. | 422 |
InvalidAssigneeException | Not an Assignee, no actor to claim for, ineligible. | 422 |
InvalidCategoryException | Cycle, too deep, project mismatch, inactive, in use (deleting without reassignTo), has children, an unknown id, a bad name / priority / due offset; a reassignTo that is the category itself, inactive or of another project. | 422 |
InvalidFieldException | Bad or duplicate key, options missing or unexpected, rule not allowed, empty label. | 422 |
InvalidTagException | Bad name or colour, duplicate, unknown (free-form off), project mismatch. | 422 |
InvalidTicketLinkException | Self link, cycle, second parent, cross-project, too deep, not linked. | 422 |
InvalidMergeException | Same ticket, source or target closed or merged, cross-project, not allowed. | 422 |
InvalidWatcherException | watch() without an actor. | 422 |
InvalidProjectException | Not a TicketProject, an invalid prefix. | 422 |
InvalidTicketLifecycleException | The configured lifecycle breaks the ticket contract. | config (500) |
InvalidTicketsConfigurationException | A junk config value (the message names the key and what it expects). | config (500) |
ActivityIsAppendOnlyException | Updating or deleting an activity entry. | — |
Lifecycle’s own TransitionDeniedException (422 / 429), AmbiguousTransitionException and SubjectTrashedException surface for transitions. Field values that fail their rules throw Laravel’s ValidationException, keyed fields.<key> and worded with the field’s label; guest fields are keyed fields.<name> from Tickets::guests() and guest.<name> when filing a ticket or changing its requester.
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 cryptoBy 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.