mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
This commit is contained in:
parent
c43c85022b
commit
1a68dcacea
@ -63,7 +63,14 @@ class Nordigen
|
|||||||
|
|
||||||
public function getRequisition(string $requisitionId)
|
public function getRequisition(string $requisitionId)
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
return $this->client->requisition->getRequisition($requisitionId);
|
return $this->client->requisition->getRequisition($requisitionId);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
if (strpos($e->getMessage(), "Invalid Requisition ID") !== false)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: return null on not found
|
// TODO: return null on not found
|
||||||
@ -81,7 +88,7 @@ class Nordigen
|
|||||||
return $it->transform($out);
|
return $it->transform($out);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
if (strpos($e->getMessage(), "Invalid Account ID") !== false)
|
if (strpos($e->getMessage(), "Invalid Account ID") !== false)
|
||||||
return null;
|
return false;
|
||||||
|
|
||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user