---
title: "Exceptions — Refresh Tokens for Laravel | Roundly"
description: "Every typed exception the package throws, when it throws, and the base class to catch them all."
url: https://roundly-consulting.com/open-source/docs/refresh-tokens-for-laravel/exceptions
language: en
---

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

[Refresh Tokens for Laravel](https://roundly-consulting.com/open-source/docs/refresh-tokens-for-laravel.md)

# Exceptions

All exceptions live in RoundlyConsulting\\RefreshTokens\\Exceptions and extend RefreshTokenException. redeem() never throws for an unknown, expired, revoked or replayed token — it returns null:

| Exception | When |
| --- | --- |
| `RefreshTokenException` | Base class — catch it for the whole family. |
| `InvalidTokenConfigurationException` | Unsafe hash.algo, token\_length out of bounds, a malformed or out-of-range integer setting, a non-string table, device\_type\_cast or hash.key, a per-issue ttl < 1 / absoluteTtl < 0, an accessReference over 64 bytes, or prune(0) (unsupportedAlgorithm, tokenLengthTooShort, tokenLengthTooLong, invalidTtl, invalidAbsoluteTtl, accessReferenceTooLong, invalidPruneWindow, notAString). The message names the key. |
| `InvalidTokenFamilyException` | An invalid familyId / newFamilyId on issue (unknownForOwner, reuseRevoked, ended, expired, malformed, alreadyExists, ambiguous). |
| `SessionNotFoundException` | session() was given a key that doesn’t exist — thrown when you enrich() or revoke() it. |
| `RevokerAssertionFailedException` | A FakeAccessTokenRevoker assertion failed. |

An invalid key\_type or a model that is not RefreshToken or a subclass of it throws the toolkit’s RoundlyConsulting\\PackageToolkit\\Exceptions\\InvalidConfigurationException instead, which is not a RefreshTokenException. Its message names the key.

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