It gets the first error message available in the whole messagelist.
@param bool $withWarning
@return null|string
324740
public function getMessage($withWarning=false) {
		if ($withWarning) return $this->messageList->firstErrorOrWarning();
		return $this->messageList->firstErrorText();
	}
1124396
protected function getSuggestedMessageTemplate($name, $withLabel)
    {
        $noLabelMessage = is_string($name) && isset($this->errorMessages[$name]) ? $this->errorMessages[$name] : null;
        if ($withLabel) {
            return is_string($name) && isset($this->labeledErrorMessages[$name]) ?
                $this->labeledErrorMessages[$name] :
                $noLabelMessage;
        }

        return $noLabelMessage;
    }
798208
public function first($field = '')
    {
        if (isset($this->errorMessages[$field])) {
            $message = reset($this->errorMessages[$field]);
        } else {
            $firstMessages = $this->firsts();
            $message = reset($firstMessages);
        }

        return $message;
    }
1312574
public function firsts()
    {
        $messages = [];
        foreach ($this->errorMessages as $fieldsMessages) {
            foreach ($fieldsMessages as $fieldMessage) {
                $messages[] = $fieldMessage;
                break;
            }
        }

        return $messages;
    }
77757
protected function getPreparedCurlErrorMessage()
    {
        $errorCode = curl_errno($this->connection);
        $errorMessage = curl_error($this->connection);

        return sprintf('An error occurred while querying the disqus API. Error: %s (%s)', $errorMessage, $errorCode);
    }
859862
public function getActionMessage($key = null) {
        $messages = $this->getAttribute(ACTION_MESSAGES_KEY);

        if ($key === null) {                            // return the first one
            if ($messages) {
                foreach ($messages as $message) return $message;
            }
        }
        elseif (key_exists($key, $messages)) {          // return the specified one
            return $messages[$key];
        }
        return $this->getActionError($key);             // look-up separately stored ActionErrors
    }
243727
public function getFailureMessage($negated = false)
    {
        $actual = $this->getStringValue($this->actual);
        $expected = $this->getStringValue($this->expected);

        if (!$negated) {
            return "Expected $actual to equal $expected";
        } else {
            return "Expected $actual not to equal $expected";
        }
    }
1258216
public function getErrorMessageFromHandle()
    {
        $errorMessage = null;

        if ($this->handle !== null) {
            $errorMessage = curl_errno($this->handle);
        }

        return $errorMessage === '' ? null : $errorMessage;
    }
836114
public function getQuery($withValues = false) {
        return $withValues ? $this->createQuery() . '<pre><code>' . print_r($this->getQueryValues(),
                        true) . '</code></pre>' : $this->createQuery();
    }
818787
public function getErrorMessage(): string
    {
        $header = $this->headers->get('grpc-message');
        return $header ? $header->getFirstValue() : substr($this->body, 0, 255);
    }
360642
public function get_message($rule)
	{
		if ( ! array_key_exists($rule, $this->error_messages))
		{
			return false;
		}

		return $this->error_messages[$rule];
	}
648520
private function withError(ResponseInterface $response, $throwable)
    {
        $text = 'Application Error';

        if ($this->displayErrorDetails) {
            $throwables = $this->unpackThrowables($throwable);
            $text = [
                'Application Error',
                $throwable->getMessage(),
                '',
                'Error Details:',
                $this->formatStacktraceForExceptions($throwables),
            ];
        }

        return $this
            ->withText($response, $text)
            ->withStatus(500);
    }
827700
final public function getErrorMessage($parsed = true) {
        return ($parsed) ? $this->parseMessages($this->errorMessages) :
                $this->errorMessages;
    }
1019602
public function get_error( $key, $all = true ) {
		if ( ! $this->has_error( $key ) ) {
			return null;
		}

		$errors = $this->errors->errors[ $key ];

		return $all ? Arr::first( $errors ) : $errors;
	}
376485
public function getErrorMessage() {
        if($this->errorMessage) {
            return $this->errorMessage;
        }

        return sprintf(self::$defaultErrorMessagePattern, $this->getName());
    }
1215679
public function getErrorMessage($error)
    {
        $jsonResponse = json_decode($error->getResponse()->getBody(), true);
        $errorMessage = $error->getMessage();

        if (count($jsonResponse['errors']) > 0) {
            $errorMessage = $jsonResponse['errors'][0]['message'];
        }

        return $errorMessage;
    }
761038
public function getError()
    {
        if ($this->errorCode !== null || $this->success === false) {
            return [
                'code'    => $this->errorCode === null ? self::UNKNOWN_ERROR_CODE : $this->errorCode,
                'message' => $this->errorMessage === null ? self::UNKNOWN_ERROR_MSG : $this->errorMessage
            ];
        } else {
            return null;
        }
    }