---
title: "Exceptions — Forms for Laravel | Roundly"
description: "Package-specific, catchable exceptions — all extending FormsException — with translatable messages you can override."
url: https://roundly-consulting.com/open-source/docs/forms-for-laravel/exceptions
language: en
---

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

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

# Exceptions

Lookups and operations throw package-specific exceptions, all extending RoundlyConsulting\\Forms\\Exceptions\\FormsException (a RuntimeException):

| Exception | Thrown when | Message key |
| --- | --- | --- |
| `FormNotFoundException` | No form matches the key (find(), update()). | form\_not\_found |
| `MultipleFormsFoundException` | More than one form matches the key. | multiple\_forms\_found |
| `UnresolvableFieldException` | No resolver is registered for a field’s type. | unresolvable\_field |
| `FormSubmissionClosedException` | submit(), draft(), finalize() or createSubmission() on a non-public or expired form (without bypassClosed: true). | submission\_closed |
| `DraftNotFoundException` | finalize() gets an unknown draft uuid (or one a racing finalize already promoted), or draft() is asked to resume a uuid that isn’t a draft of that form saved by that sender. | draft\_not\_found |
| `SubmissionNotFoundException` | Forms::submission() or Forms::review() gets an unknown or malformed uuid, or createSubmission() a uuid that is malformed or names another form’s submission or a draft. | submission\_not\_found |
| `ReviewsDisabledException` | A review is opened while forms.approvals.enabled is false. | reviews\_disabled |
| `SubmissionNotReviewableException` | A review is opened on a draft submission, or names no reviewers. | submission\_not\_reviewable, submission\_review\_without\_reviewers |

A value that fails its field’s type is a validation failure, not an exception of its own: it throws Laravel’s ValidationException (see Typed field values). Catch a specific exception, or FormsException for all of them:

```php
use RoundlyConsulting\Forms\Exceptions\FormNotFoundException;
use RoundlyConsulting\Forms\Exceptions\FormsException;

try {
    $form = Forms::find($key);
} catch (FormNotFoundException $e) {
    abort(404);
}

try {
    Forms::finalize($uuid);
} catch (FormsException $e) {
    // any package-specific failure (draft not found, form closed, ...)
}
```

A misconfigured setting is the one exception outside FormsException: it throws RoundlyConsulting\\PackageToolkit\\Exceptions\\InvalidConfigurationException from the package toolkit, naming the key — see Configuration.

## Translatable messages

Messages live in the forms::messages namespace, which ships in English and Slovak with identical keys and placeholders — set the app locale to sk and they are served in Slovak. Publish forms-translations to edit them or add another locale alongside. The :type of invalid\_field\_value is the types.\* phrase of the field’s AttributeType, worded to fit each language’s own sentence:

```php
// lang/vendor/forms/en/messages.php (after publishing forms-translations; sk/messages.php sits beside it)
return [
    'form_not_found' => 'No form found for key [:key].',
    'multiple_forms_found' => 'Multiple forms found for key [:key].',
    'unresolvable_field' => 'No resolver registered for field type [:type].',
    'submission_closed' => 'Form [:key] is not accepting submissions.',
    'draft_not_found' => 'No draft submission found for UUID [:uuid].',
    'submission_not_found' => 'No submission found for UUID [:uuid].',
    'invalid_field_value' => 'The :attribute field must be a valid :type.',
    // The :type of invalid_field_value, per AttributeType — worded to fit that sentence.
    'types' => [
        'string' => 'text value',
        'integer' => 'integer',
        'float' => 'number',
        'boolean' => 'yes/no value',
        'array' => 'list',
        'datetime' => 'date',
    ],
    'reviews_disabled' => 'Submission reviews are disabled. Enable forms.approvals.enabled to route submissions through the approvals engine.',
    'submission_not_reviewable' => 'Submission [:uuid] cannot be reviewed while it is a draft.',
    'submission_review_without_reviewers' => 'Submission [:uuid] cannot be reviewed without naming its reviewers: pass them to requiring().',
];
```

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