Skip to content
Snippets Groups Projects
Commit d9118b07 authored by Patrick Kenny's avatar Patrick Kenny
Browse files

Issue #3448572 by ptmkenny: Provide more detailed debug info when the test message fails

parent 5176db90
No related branches found
No related tags found
1 merge request!22add more detailed test message debug info
Pipeline #178254 passed
......@@ -97,8 +97,10 @@ final class FirebasePhpSendTestMessageForm extends FormBase {
// @phpstan-ignore-next-line Exception is shown to admin, so no rethrowing.
catch (\Exception $e) {
Error::logException($this->logger('firebase_php'), $e);
$this->messenger()->addError($this->t('Failed to send the test message. Error: %error', [
$details = method_exists($e, 'errors') ? $e->errors() : 'No details available.';
$this->messenger()->addError($this->t('Failed to send the test message. Error: %error More info: %errorDetails', [
'%error' => $e->getMessage(),
'%errorDetails' => json_encode($details),
]));
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment