http_status = in_array( $http_status, self::VALID_HTTP_STATUSES, true ) ? $http_status : 401; parent::__construct($message ?: __('API authentication failed. Please contact the site administrator.', 'ai-product-tools'), $code, $previous); } /** * Get user-friendly error message. * * Since this is a non-recoverable authentication error, the message * directs users to contact admin/support rather than suggesting retry. * * @return string */ public function getUserMessage(): string { return __('The chat service is currently unavailable due to a configuration issue. Please contact the site administrator or support for assistance.', 'ai-product-tools'); } }