Exceptions
N8nException
Namespace:
php
PhpN8n\Client\Exceptions\N8nExceptionBase package exception. Extends RuntimeException.
RequestException
Namespace:
php
PhpN8n\Client\Exceptions\RequestExceptionUsed for failed HTTP requests and invalid n8n API responses. Extends N8nException.
Constructor
php
public function __construct(
string $message,
?ResponseInterface $response = null,
?Throwable $previous = null,
)Methods
| Method | Returns |
|---|---|
response() | `ResponseInterface |
AuthenticationException
Namespace:
php
PhpN8n\Client\Exceptions\AuthenticationExceptionUsed when n8n returns HTTP 401. Extends RequestException.
ExecutionTimeoutException
Namespace:
php
PhpN8n\Client\Exceptions\ExecutionTimeoutExceptionUsed when execution polling exceeds the configured timeout. Extends N8nException.
Methods
| Method | Returns |
|---|---|
reference() | ExecutionReference |
InvalidWebhookResponseException
Namespace:
php
PhpN8n\Client\Exceptions\InvalidWebhookResponseExceptionUsed when a webhook response has a JSON content type but the body is invalid JSON. Extends N8nException.
Validation Exceptions
Some local validation failures throw PHP's InvalidArgumentException, for example invalid webhook URLs, unsupported webhook methods, empty execution IDs, and invalid polling values.
