Issue #2486943 by lostkangaroo, Crell, neclimdul: Standardize error message property name
parent
07f92ed7f5
commit
e6ea417035
|
@ -159,7 +159,7 @@ class DefaultExceptionSubscriber implements EventSubscriberInterface {
|
|||
// 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 @@ class AuthTest extends RESTTestBase {
|
|||
// 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);
|
||||
|
|
Loading…
Reference in New Issue