---
title: "Exceptions — Tickets for Laravel | Roundly"
description: "Every TicketsException subclass, when it is thrown and the HTTP status the API answers with — plus how field and guest validation errors are keyed."
url: https://roundly-consulting.com/open-source/docs/tickets-for-laravel/exceptions
language: en
---

[All packages](https://roundly-consulting.com/open-source.md)

[Tickets for Laravel](https://roundly-consulting.com/open-source/docs/tickets-for-laravel.md)

# 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 crypto](https://roundly-consulting.com/support-us.md)

By donating, you agree to our [donation terms](https://roundly-consulting.com/donation-terms.md).

[Support our open source work (opens in a new tab)](https://donate.stripe.com/dRmeVe8FX5PF1Qd9pXcEw00) [Join us on Patreon (opens in a new tab)](https://www.patreon.com/cw/roundly)

## 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.

[Get a quote in 48 hours](https://roundly-consulting.com/contact.md) [Browse all packages](https://roundly-consulting.com/open-source/docs/tickets-for-laravel.md)
