Skip to content

Commit

Permalink
Update RequestSender.php
Browse files Browse the repository at this point in the history
  • Loading branch information
sb15 authored Feb 29, 2024
1 parent 06e737d commit a8fddee
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/RequestSender.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ public function send(RequestInterface $request): ResponseInterface
try {
$httpResponse = $this->httpClient->request($request->getMethod()->getValue(), $request->getUri(), $options);
} catch (RequestException $e) {
$this->eventDispatcher->dispatch(
'expert_sender_api.request.exception_thrown',
new RequestExceptionThrown($request, $e)
$this->eventDispatcher->dispatch(
new RequestExceptionThrown($request, $e),
'expert_sender_api.request.exception_thrown'
);

if ($e->getResponse() !== null) {
Expand Down Expand Up @@ -107,8 +107,8 @@ public function send(RequestInterface $request): ResponseInterface

$apiResponse = new Response($httpResponse);
$this->eventDispatcher->dispatch(
'expert_sender_api.response.received',
new ResponseReceivedEvent($apiResponse)
new ResponseReceivedEvent($apiResponse),
'expert_sender_api.response.received'
);

return $apiResponse;
Expand Down

0 comments on commit a8fddee

Please sign in to comment.