Skip to content

Commit

Permalink
Uncatch exception within request creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Ralf Eggert committed Nov 5, 2017
1 parent 5140502 commit a0f8b2b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
10 changes: 5 additions & 5 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 4 additions & 8 deletions src/Request/AlexaRequestFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,10 @@ public function __invoke(ContainerInterface $container, $requestedName, array $o
return null;
}

try {
/** @var AlexaRequest $alexaRequest */
$alexaRequest = RequestTypeFactory::createFromData(
$serverRequest->getBody()->getContents()
);
} catch (Exception $e) {
return null;
}
/** @var AlexaRequest $alexaRequest */
$alexaRequest = RequestTypeFactory::createFromData(
$serverRequest->getBody()->getContents()
);

return $alexaRequest;
}
Expand Down

0 comments on commit a0f8b2b

Please sign in to comment.