Skip to content

Commit 34b1289

Browse files
committed
Throw Omnipay NotFound in case resource not found on gateway
1 parent 013056d commit 34b1289

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Message/FindCustomerRequest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace Omnipay\Braintree\Message;
44

55
use Braintree\Exception\NotFound;
6-
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
6+
use Omnipay\Common\Exception\NotFoundException;
77

88
/**
99
* Find Customer Request
@@ -22,14 +22,14 @@ public function getData()
2222
* @param mixed $data
2323
*
2424
* @return \Omnipay\Braintree\Message\CustomerResponse|\Omnipay\Common\Message\ResponseInterface
25-
* @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
25+
* @throws \Omnipay\Common\Exception\NotFoundException
2626
*/
2727
public function sendData($data)
2828
{
2929
try {
3030
$response = $this->braintree->customer()->find($this->getCustomerId());
3131
} catch (NotFound $exception) {
32-
throw new NotFoundHttpException($exception->getMessage());
32+
throw new NotFoundException($exception->getMessage());
3333
}
3434

3535
return $this->response = new CustomerResponse($this, $response);

0 commit comments

Comments
 (0)