1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +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)
{
return $this->client->requisition->getRequisition($requisitionId);
try {
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
@ -81,7 +88,7 @@ class Nordigen
return $it->transform($out);
} catch (\Exception $e) {
if (strpos($e->getMessage(), "Invalid Account ID") !== false)
return null;
return false;
throw $e;
}