Change the JSON API error message
[MAILPOET-1103]
This commit is contained in:
@ -57,7 +57,7 @@ class API {
|
|||||||
$this->setRequestData($_POST);
|
$this->setRequestData($_POST);
|
||||||
|
|
||||||
if($this->checkToken() === false) {
|
if($this->checkToken() === false) {
|
||||||
$error_message = __('Invalid API request.', 'mailpoet');
|
$error_message = __('Sorry, but we couldn\'t connect to the MailPoet server. Please refresh the web page and try again.', 'mailpoet');
|
||||||
$error_response = $this->createErrorResponse(Error::UNAUTHORIZED, $error_message, Response::STATUS_UNAUTHORIZED);
|
$error_response = $this->createErrorResponse(Error::UNAUTHORIZED, $error_message, Response::STATUS_UNAUTHORIZED);
|
||||||
return $error_response->send();
|
return $error_response->send();
|
||||||
}
|
}
|
||||||
@ -200,4 +200,4 @@ class API {
|
|||||||
);
|
);
|
||||||
return $error_response;
|
return $error_response;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user