Extract domain verification error messages from bridge to strings

As a part of those changes I tried to unify the array key with error messages.
[MAILPOET-4639]
This commit is contained in:
Jan Lysý
2023-01-06 19:35:23 +01:00
committed by Aschepikov
parent 2ace6da75b
commit 07954dd968
4 changed files with 36 additions and 26 deletions

View File

@ -348,7 +348,7 @@ class Settings extends APIEndpoint {
if (!$response['ok']) {
// sender domain verification error. probably an improper setup
return $this->badRequest([
APIError::BAD_REQUEST => $response['error'] ?? __('Sender domain verification failed.', 'mailpoet'),
APIError::BAD_REQUEST => $response['message'] ?? __('Sender domain verification failed.', 'mailpoet'),
], $response);
}