# HydrationException

> Reports a strict JSON schema violation with its payload path.

[API reference](/docs/api/index.md) › [Debug Core](/docs/extensions/debug-core/reference/index.md) › [Storage](/docs/extensions/debug-core/reference/storage/index.md) › HydrationException

| final class | `PHPForge\Debug\Storage\HydrationException` |
| --- | --- |
| Extends | [`RuntimeException`](https://www.php.net/manual/en/class.runtimeexception.php) |
| Source | [`src/Storage/HydrationException.php`](https://github.com/php-forge/debug-core/blob/main/src/Storage/HydrationException.php#L13) |

Reports a strict JSON schema violation with its payload path.

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`at()`](#method-at) static | Creates an exception that identifies an invalid payload path and its expected value. | `HydrationException` |

## Method details

### at() <span id="method-at"></span>

```php
public static function at(string $path, string $expected): self
```

Creates an exception that identifies an invalid payload path and its expected value.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$path` | `string` | Path of the invalid payload value. |
| `$expected` | `string` | Description of the expected value. |

**Returns**

`self`: Hydration exception containing the schema violation.