8000 error message fix · symfony/symfony@d1bfbc1 · GitHub
[go: up one dir, main page]

Skip to content

Commit d1bfbc1

Browse files
committed
error message fix
1 parent 96065eb commit d1bfbc1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Symfony/Component/Mailer/Bridge/Mailgun/Tests/Transport/MailgunApiTransportTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public function testSendThrowsForErrorResponse()
176176
->text('Hello There!');
177177

178178
$this->expectException(HttpTransportException::class);
179-
$this->expectExceptionMessage('Unable to send an email: "i\'m a teapot" (code "418").');
179+
$this->expectExceptionMessage('Unable to send an email: "i\'m a teapot" (code 418).');
180180
$transport->send($mail);
181181
}
182182

src/Symfony/Component/Mailer/Bridge/Mailgun/Transport/MailgunApiTransport.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ protected function doSendApi(SentMessage $sentMessage, Email $email, Envelope $e
6767
$result = $response->toArray(false);
6868
if (200 !== $response->getStatusCode()) {
6969
if ('application/json' === $response->getHeaders(false)['content-type'][0]) {
70-
throw new HttpTransportException(sprintf('Unable to send an email: "%s" (code "%s").', $result['message'], $response->getStatusCode()), $response);
70+
throw new HttpTransportException(sprintf('Unable to send an email: "%s" (code %d).', $result['message'], $response->getStatusCode()), $response);
7171
}
7272

73-
throw new HttpTransportException(sprintf('Unable to send an email: "%s" (code "%s").', $response->getContent(false), $response->getStatusCode()), $response);
73+
throw new HttpTransportException(sprintf('Unable to send an email: "%s" (code %d).', $response->getContent(false), $response->getStatusCode()), $response);
7474
}
7575

7676
$sentMessage->setMessageId($result['id']);

0 commit comments

Comments
 (0)
0