```` php
// Im ErrorHandler wird jetzt ErrorHandlerContext verwendet
private function createErrorContext(Throwable $exception, ?MiddlewareContext $context = null): ErrorContext
{
$handlerContext = ErrorHandlerContext::fromException($exception, [
'request_id' => $context?->requestId ?? $this->requestIdGenerator->generate(),
'timestamp' => date('c'),
'environment' => $_ENV['APP_ENV'] ?? 'production',
'debug_mode' => $this->isDebugMode
]);

    return new ErrorContext(
        exception: $exception,
        level: $this->determineErrorLevel($exception),
        requestId: $context?->requestId ?? $this->requestIdGenerator->generate(),
        context: $handlerContext, // Jetzt ErrorHandlerContext statt ExceptionContext
        additionalData: [
            'memory_usage' => memory_get_peak_usage(true),
        ]
    );
}
````
