1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00
paulwer 2023-12-20 12:22:24 +01:00
parent c43c85022b
commit 1a68dcacea

View File

@ -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;
} }