---
title: "Exceptions — Likes for Laravel | Roundly"
description: "InvalidReactionTypeException, NoAuthenticatedActorException and their shared LikesException base."
url: https://roundly-consulting.com/open-source/docs/likes-for-laravel/exceptions
language: en
---

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

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

# Exceptions

All package exceptions live in RoundlyConsulting\\Likes\\Exceptions:

| Exception | Thrown when |
| --- | --- |
| `InvalidReactionTypeException` | A reaction type is not in likes.reactions — including a default\_reaction missing from the list. |
| `NoAuthenticatedActorException` | The facade or a PendingLike chain needs an actor, none was passed and actor\_resolver resolves nothing. |
| `LikesException` | Never directly — the abstract base of both, extending RuntimeException. Catch it to handle any package error. |

Catch the base class to turn any package error into a response:

```php
use RoundlyConsulting\Likes\Exceptions\LikesException;
use RoundlyConsulting\Likes\Facades\Likes;

try {
    Likes::as($request->string('reaction')->toString())->react($post);
} catch (LikesException $e) {
    abort(422, $e->getMessage());
}
```

The InteractsWithLikes testing helpers throw a plain RuntimeException when no liker is set — see Testing.

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