From fa6547413a1e4a44736d3bb963cedfa4938d461d Mon Sep 17 00:00:00 2001 From: Anjan Som Date: Tue, 9 Jun 2026 17:52:35 +0200 Subject: [PATCH] fix: omit empty expiry from PIS connect payload The form submits an empty expiry when the field is left blank, which was passed through as `expiry: ""`. With fintecture-client >= 2.5.x this is forwarded to meta.expiry, and the API rejects it (406: "$/meta/expiry must match pattern ^[0-9]+$"). Falling back to undefined when blank omits the field entirely, matching the simulator's handling. Co-Authored-By: Claude Opus 4.7 (1M context) --- pis-connect.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pis-connect.js b/pis-connect.js index 6a532c5..3c4b88b 100644 --- a/pis-connect.js +++ b/pis-connect.js @@ -70,7 +70,7 @@ app.post("/connect", async (req, res) => { psu_type: req.body.psu_type || 'retail', country: req.body.country || 'fr', scheme: req.body.scheme, - expiry: req.body.expiry, + expiry: req.body.expiry || undefined, scheduled_expiration_policy: req.body.scheduled_expiration_policy };