🔐 Sid Gifari File Manager Pro
v8.0.5 | 2026-06-19 11:11:11 | PHP 8.1.34
📂
/ (Root)
/
home
/
therahul
/
thedasstores.com
/
wp-content
/
plugins
/
mailpoet
/
lib
/
API
/
JSON
📍 /home/therahul/thedasstores.com/wp-content/plugins/mailpoet/lib/API/JSON
🔄 Refresh
✏️
Editing: ErrorHandler.php
Writable
<?php declare(strict_types = 1); namespace MailPoet\API\JSON; if (!defined('ABSPATH')) exit; use MailPoet\Exception; use MailPoet\HttpAwareException; class ErrorHandler { /** @var string[] */ private $defaultErrors = []; public function convertToResponse(\Throwable $e): ErrorResponse { $this->defaultErrors[Error::UNKNOWN] = __('An unknown error occurred.', 'mailpoet'); if ($e instanceof Exception) { $errors = $e->getErrors() ?: $this->defaultErrors; $statusCode = $e instanceof HttpAwareException ? $e->getHttpStatusCode() : Response::STATUS_UNKNOWN; return new ErrorResponse($errors, [], $statusCode); } return new ErrorResponse($this->defaultErrors, [], Response::STATUS_UNKNOWN); } }
💾 Save Changes
❌ Cancel