Error message shown when an AJAX request has no access

@param string $errorMessage
@return string
505385
public function ajaxNoAccess($errorMessage)
    {
        return sprintf(
            '<div class="alert alert-danger">
                <p><strong>%s:</strong> %s</p>
                <p><a href="%s">%s</a></p>
            </div>',
            Piwik::translate('General_Error'),
            htmlentities($errorMessage, Common::HTML_ENCODING_QUOTE_STYLE, 'UTF-8', $doubleEncode = false),
            'index.php?module=' . Piwik::getLoginPluginName(),
            Piwik::translate('Login_LogIn')
        );
    }
123025
protected function error($errors = null, string $message = '')
    {

        if(!$errors) {
            $errors = ['Your request has not been validated by the system. Please check your request URL and parameters!'];
        }

        // make it array
        else if(!is_array($errors)) {
            $errors = [$errors];
        }

        return response()->json(['errors' => $errors], 400);
    }
747098
public function getErrorMessage()
    {
        if ($this->returnLetter instanceof ReturnLetter
                && $this->returnLetter->errorID !== 0) {
            return $this->returnLetter->error;
        }
    }
584747
public static function getUploadErrorMessage($errorId)
    {
        $messagesArray = self::getUploadErrorMessages();
        return isset($messagesArray[$errorId]) ? $messagesArray[$errorId] : 'Unknown upload error.';
    }
1317583
public function RenderError ($exceptionMessage = '') {
		if ($this->application->IsErrorDispatched()) return;
		throw new \ErrorException(
			$exceptionMessage ? $exceptionMessage :
			"Server error: `" . htmlspecialchars($this->request->GetFullUrl()) . "`.",
			500
		);
	}
340959
function ErrorMsg()
	{
		if ($this->_logsql) return $this->_errorMsg;
		if (function_exists('sybase_get_last_message'))
			$this->_errorMsg = sybase_get_last_message();
		else
			$this->_errorMsg = isset($php_errormsg) ? $php_errormsg : 'SYBASE error messages not supported on this platform';
		return $this->_errorMsg;
	}
156460
public function methodNotAllowed($msg = '', $errorCode = null, $headers = [])
    {
        return $this->getErrorResponse($msg, $errorCode, self::HTTP_METHOD_NOT_ALLOWED, $headers);
    }
928983
protected function jsonErrorResponse($errorMessage, $statusCode = 400, array $httpHeaders = array())
    {
        $statusTexts = \Symfony\Component\HttpFoundation\Response::$statusTexts;

        return $this->jsonResponse(array(
            'error' => (string) $errorMessage,
        ), array(
            'status' => array(
                'code'    => (int) $statusCode,
                'message' => $statusTexts[$statusCode],
            ),
        ), $httpHeaders);
    }
47520
protected function jsonDecode($value, $errorMessage = null) {
        $decoded = json_decode($value, true);

        if (json_last_error() !== JSON_ERROR_NONE) {
            throw new InvalidArgumentException(
                $errorMessage ?: 'The supplied parameter is not a valid JSON object.'
            );
        }

        return $decoded;
    }
25113
protected function throwNewInvalidArgumentException ($errorMsg) {
		$msgs = [];
		if ($this->field) 
			$msgs[] = 'Field name: `'.$this->field->GetName() . '`, Field type: `'.get_class($this->field).'`';
		if ($this->form) 
			$msgs[] = 'Form id: `'.$this->form->GetId() . '`, Form type: `'.get_class($this->form).'`';
		$selfClass = version_compare(PHP_VERSION, '5.5', '>') ? self::class : __CLASS__;
		throw new \InvalidArgumentException(
			'['.$selfClass.'] ' . $errorMsg . ($msgs ? ' '.implode(', ', $msgs) : '')
		);
	}
886351
public function forbidden($msg = '', $errorCode = null, $headers = [])
    {
        return $this->getErrorResponse($msg, $errorCode, self::HTTP_FORBIDDEN, $headers);
    }
1247846
public function getError($errorCode) {
        if (array_key_exists($errorCode, $this->_errors)) {
            $result = $this->_errors[$errorCode];
            return $result;
        } else {
            return null;
        }
    }
295643
public function jsonError($errorCode, $errorMessage = null)
    {
        // Build error from message
        $error = [
            'type' => 'error',
            'code' => $errorCode,
        ];
        if ($errorMessage) {
            $error['value'] = $errorMessage;
        }

        // Support explicit error handling with status = error, or generic message handling
        // with a message of type = error
        $result = [
            'status' => 'error',
            'errors' => [$error]
        ];
        $response = HTTPResponse::create(json_encode($result), $errorCode)
            ->addHeader('Content-Type', 'application/json');

        // Call a handler method such as onBeforeHTTPError404
        $this->extend("onBeforeJSONError{$errorCode}", $request, $response);

        // Call a handler method such as onBeforeHTTPError, passing 404 as the first arg
        $this->extend('onBeforeJSONError', $errorCode, $request, $response);

        // Throw a new exception
        throw new HTTPResponse_Exception($response);
    }
1051428
private function getMessage($status) {
		if($this->messages === false) {
			$this->messages = require(__DIR__ . '/messages.php');
		}

		return isset($this->messages[$status]) ? $this->messages[$status] : "Error: $status";
	}
1014323
public String getErrorMessage ()
    {
        String msg = getMessage();
        return String.valueOf(_errorCode).equals(msg) ? null : msg;
    }
245438
protected static function assert($condition, string $errorMessage = '', bool $exitOnError = false): bool
    {
        self::$totalCount++;
        self::$count++;
        if (!$condition) {
            $trace = debug_backtrace();
            $errorPrefix = (isset($trace[1]['class']) ? ($trace[1]['class'] 
                    . (isset($trace[1]['function']) ? '::' . $trace[1]['function'] : '') 
                    . (isset($trace[1]['line']) ? ' (' . $trace[1]['line'] . ')' : '') 
                    . ' -> ') : '')
                    . $trace[0]['class'] . ' (' . $trace[0]['line'] . ")\n    ";
            self::addError($errorPrefix . $errorMessage);
            self::$totalCountErrors++;
            if ($exitOnError) {
                exit;
            }
        }
        return (bool) $condition;
    }
1122915
public function getErrorMessage()
    {
        switch ($this->error) {
            case UPLOAD_ERR_OK:
                return 'File uploaded successfully.';
            case UPLOAD_ERR_INI_SIZE:
            case UPLOAD_ERR_FORM_SIZE:
                return 'The uploaded file exceeds the maximum file size.';
            case UPLOAD_ERR_NO_FILE:
                return 'No file was uploaded.';
            case UPLOAD_ERR_PARTIAL:
                return 'The file was only partially uploaded.';
            case UPLOAD_ERR_NO_TMP_DIR:
            case UPLOAD_ERR_CANT_WRITE:
                return 'Could not create temporary file.';
            case UPLOAD_ERR_EXTENSION:
                return 'The upload was blocked.';
        }

        return 'An unknown error occured.';
    }