Skip to content

fix: omit empty expiry from PIS connect payload#11

Open
fintecturegit wants to merge 1 commit into
masterfrom
fix/pis-connect-expiry-optional
Open

fix: omit empty expiry from PIS connect payload#11
fintecturegit wants to merge 1 commit into
masterfrom
fix/pis-connect-expiry-optional

Conversation

@fintecturegit

Copy link
Copy Markdown
Contributor

Summary

The PIS connect form passes expiry: req.body.expiry directly. When the expiry field is left blank, that sends expiry: "", which fintecture-client >= 2.5.x forwards to meta.expiry. The API then rejects it:

406 — "$/meta/expiry must match pattern \"^[0-9]+$\""

Falling back to undefined when blank omits the field entirely (JSON.stringify drops undefined), matching how the simulator already handles it.

Change

- expiry: req.body.expiry,
+ expiry: req.body.expiry || undefined,

Context

Surfaced when sample-pis-connect-test was upgraded from fintecture-client 2.0.2 to 2.5.3 (2.0.2 didn't forward expiry; 2.5.x does). Already hotfixed on the deployed instance; this brings the repo in line.

🤖 Generated with Claude Code

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) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant