---
title: "Exceptions — Events for Laravel | Roundly"
description: "Every EventsException with its code and HTTP status, the errors the API maps from tags, lifecycle and media-library, and configuration errors."
url: https://roundly-consulting.com/open-source/docs/events-for-laravel/exceptions
language: en
---

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

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

# Exceptions

Every client-facing exception extends the abstract Exceptions\\EventsException (a RuntimeException). errorCode() is the stable code, status() the HTTP status the API answers with, and getMessage() is already the client-safe text — translated into the current locale (events::messages, en and sk), never naming a class, key or table. In your own controllers:

```php
use RoundlyConsulting\Events\Exceptions\EventsException;

try {
    $rsvp = Events::for($event)->rsvp($request->user())->by($request->user())->going(tier: $request->input('tier'));
} catch (EventsException $e) {
    return response()->json(['message' => $e->getMessage(), 'code' => $e->errorCode()], $e->status());
}
```

| Exception | code | HTTP | Thrown when |
| --- | --- | --- | --- |
| `EventNotFoundException` | `event_not_found` | 404 | An unknown, trashed or (over the API) hidden event; a calendar file for a viewer who may not see the event. |
| `VenueNotFoundException · TierNotFoundException` | `venue_not_found · tier_not_found` | 404 | A ticket type of another event, or an unknown key or id. |
| `RsvpNotFoundException` | `rsvp_not_found` | 404 | An RSVP of another event; an unknown or superseded payment reference; a check-in for an attendee whose row is gone. |
| `InvalidEventException` | `invalid_event` | 422 | Title missing or too long, a bad join link, a mode that disagrees with venue and link, a new start on an announced event, deleting an event people are going to, bad reminders, no organizer, a taken manual slug, moving a finished event online, an invitation message over 1000. |
| `InvalidEventScheduleException` | `invalid_schedule` | 422 | No start, end before start, too long, doors outside the 12 hours before the start, a bad timezone, date-time or duration, a time in a DST gap, a bad all-day range or RSVP window. |
| `InvalidVenueException` | `invalid_venue / venue_in_use` | 422 | No name, bad coordinates, a bad country code, a radius out of range / deleting a venue an unfinished event uses. |
| `InvalidTierException` | `invalid_tier / tier_key_taken / tier_in_use` | 422 | Bad name, key, party limits, sale window, capacity, price or reorder / a taken key / removing a ticket type in use. |
| `InvalidGuestCountException · TierRequiredException` | `invalid_guest_count · tier_required` | 422 | Guests outside the limits · going() without a ticket type while several are on sale. |
| `TierNotOnSaleException · EventFullException · TierSoldOutException` | `tier_not_on_sale · event_full · tier_sold_out` | 409 | A newly picked type outside its sale · no seats and no waitlist. |
| `RsvpClosedException` | `rsvp_closed` | 409 | RSVPs closed or not open yet, the event started, cancelled or completed — and a payment from the start on (refund it). |
| `InvitationRequiredException` | `invitation_required` | 403 | Answering a private event without an invitation. |
| `InvalidRsvpTransitionException` | `invalid_rsvp_transition` | 409 | A checked-in attendee declining or shrinking below the guests through the door, a paid seat changed by answering, confirming or releasing what is not held, checking in what is not going. |
| `RsvpHoldExpiredException` | `hold_expired` | 409 | A late payment with no seats left. |
| `InvalidCheckInCodeException · CheckInRefusedException` | `invalid_code · check_in_refused` | 404 · 409 | See Check-in at the door. |
| `InvalidInvitationException` | `invalid_invitation` | 404 | An unknown, malformed, revoked, expired or used token, or someone else’s link — uniform. |
| `EventTrashedException` | `event_trashed` | 409 | Any write to a trashed event. |
| `UnknownEventTransitionException · EventTransitionDeniedException` | `unknown_transition · transition_denied` | 422 (429) | A verb the lifecycle does not offer · lifecycle refused (denials(), retryAfterSeconds(), previousDenial()). |
| `InvalidOrganizerException · UnknownMorphAliasException · InvalidEventQueryException` | `invalid_organizer · unknown_alias · invalid_query` | 422 (400) | Organizing as someone who does not allow the actor · an unknown API alias or key · a bad API filter value. |

EventTransitionDeniedException also has denials() (lifecycle’s denial codes plus no\_attendees and rescheduled\_through\_events), retryAfterSeconds() (0 unless rate limited; the API sends Retry-After) and previousDenial(). CheckInRefusedException::reason() is one of the constants WRONG\_EVENT, NOT\_GOING, EVENT\_NOT\_ACTIVE and OUTSIDE\_WINDOW.

## Errors the API maps from elsewhere

| Source | API answer |
| --- | --- |
| Laravel’s AuthorizationException | `403 forbidden` |
| lifecycle’s SubjectTrashedException | `409 event_trashed` |
| tags’ TagNotFoundException, TagScopeMismatchException | `422 tag_not_found` |
| tags’ TagLimitExceededException | `422 tag_limit_exceeded` |
| tags’ InvalidTagException, TagTypeMismatchException, TagTypeNotAllowedException, UnknownTagTypeException | `422 invalid_tag` |
| media-library’s FileUnacceptableForBucket, DraftMediaNotFound, DraftMediaExpired | `422 invalid_poster` |
| Validation | `422 validation_failed + errors` |

In PHP these pass through unchanged.

## Configuration errors

These are the host’s to fix: English, naming the key, and extending the toolkit’s PackageToolkitException. InvalidEventsConfigurationException covers a bad duration, timezone, table name, time of day, URL template or choice — outOfRange() for a value outside its bounds, tooMany() for more than five reminder offsets and keyTypeMismatch() when a model’s key does not fit events.key\_type, raised before any SQL. InvalidEventLifecycleException covers an events.lifecycle value that is not a LifecycleDefinition implementing Contracts\\EventLifecycle, or one that breaks the contract. The toolkit’s own InvalidConfigurationException covers a model, resource, notification class or list that is not what its key needs.

## 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/events-for-laravel.md)
