Commit e6ea4170 authored by xjm's avatar xjm

Issue #2486943 by lostkangaroo, Crell, neclimdul: Standardize error message property name

parent 07f92ed7
......@@ -159,7 +159,7 @@ protected function onJson(GetResponseForExceptionEvent $event) {
// of message to be displayed,
$data = NULL;
if (error_displayable($error) && $message = $exception->getMessage()) {
$data = ['error' => sprintf('A fatal error occurred: %s', $message)];
$data = ['message' => sprintf('A fatal error occurred: %s', $message)];
}
$response = new JsonResponse($data, Response::HTTP_INTERNAL_SERVER_ERROR);
......
......@@ -40,7 +40,7 @@ public function testRead() {
// Try to read the resource as an anonymous user, which should not work.
$this->httpRequest($entity->urlInfo(), 'GET', NULL, $this->defaultMimeType);
$this->assertResponse('401', 'HTTP response code is 401 when the request is not authenticated and the user is anonymous.');
$this->assertRaw(json_encode(['error' => 'A fatal error occurred: No authentication credentials provided.']));
$this->assertRaw(json_encode(['message' => 'A fatal error occurred: No authentication credentials provided.']));
// Ensure that cURL settings/headers aren't carried over to next request.
unset($this->curlHandle);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment