8000 bug #37890 [Notifier] Fixed base_uri while call auth/time API (leblan… · symfony/symfony@dd19056 · GitHub
[go: up one dir, main page]

Skip to content

Commit dd19056

Browse files
committed
bug #37890 [Notifier] Fixed base_uri while call auth/time API (leblanc-simon)
This PR was squashed before being merged into the 5.1 branch. Discussion ---------- [Notifier] Fixed base_uri while call auth/time API This patch fixed the base_uri missing while we call the auth/time OVH API. * Without this patch, the API call failed because the URL is wrong : eu.api.ovh.com/auth/time * With this patch, the API call successed, URL is : https://eu.api.ovh.com/1.0/auth/time | Q | A | ------------- | --- | Branch? | 5.1 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fixed base_uri while call auth/time API | License | MIT Commits ------- 2f91485 [Notifier] Fixed base_uri while call auth/time API
2 parents 679cc4d + 2f91485 commit dd19056

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/Notifier/Bridge/OvhCloud/OvhCloudTransport.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ protected function doSend(MessageInterface $message): void
8888
if (200 !== $response->getStatusCode()) {
8989
$error = $response->toArray(false);
9090

91-
throw new TransportException(sprintf('Unable to send the SMS: %s.', $error['message']), $response);
91+
throw new TransportException(sprintf('Unable to send the SMS: "%s".', $error['message']), $response);
9292
}
9393
}
9494

@@ -97,7 +97,7 @@ protected function doSend(MessageInterface $message): void
9797
*/
9898
private function calculateTimeDelta(): int
9999
{
100-
$endpoint = sprintf('%s/auth/time', $this->getEndpoint());
100+
$endpoint = sprintf('https://%s/1.0/auth/time', $this->getEndpoint());
101101
$response = $this->client->request('GET', $endpoint);
102102

103103
return $response->getContent() - time();

0 commit comments

Comments
 (0)
0