EXP-4396: fix DSFinV-K cash point closing error field deserialization (38.1.1) - #323
Conversation
… (38.1.1)
Fiskaly API v1.27.6 changed closings with incorrect SLAVE_WITHOUT_TSS
cash registers to ERROR state. The 200 response now includes an `error`
object ({ code, message }) instead of a string, causing a JsonException
at $.error during deserialization.
- CashPointClosingResponse: change Error from string to CashPointClosingError
- CashPointClosingMapper: map error object to string (Message ?? Code)
- Versions: Fiskaly 2.5.0 → 2.5.1, All 38.1.0 → 38.1.1
|
✅ Review posted. View review · run |
|
The pull request was updated while this review was being prepared, so it is posted as a comment rather than a formal review. Risk AssessmentScore: 2/10 — low Targeted hotfix for an external API contract change with no logic errors, no API surface breakage, and correct null-safety in the mapping. The only minor gap is the absent PR template checklist (no test file in the diff). Review SummaryAPPROVE — 0 findings. Clean fix. The PR template's Checklist section (type of change, breaking-change flag, test coverage) was not included in the PR body. The "Tests included" item is the most relevant omission: no unit test was added to cover the new |
What
Fixes a
JsonExceptionthrown byDsfinvkClosingSynchronizerJobwhen Fiskaly returns a cash point closing inERRORstate.Fiskaly API v1.27.6 (2026-06-16) started setting closings with incorrect use of
SLAVE_WITHOUT_TSScash registers toERRORstate. In that case the 200 response body includes anerrorobject ({ code, message }), butCashPointClosingResponsehadpublic string Error— causing the deserializer to throw at$.error.Changes
CashPointClosingResponse— changeErrorfromstringto a newCashPointClosingErrorDTO ({ Code, Message }).CashPointClosingMapper— map error object tostringusingError?.Message ?? Error?.Code, preserving the publicCashPointClosingResult.Error: stringAPI contract.2.5.0 → 2.5.1, All38.1.0 → 38.1.1.Notes
DsfinvkErrorResponse(used for HTTP 4xx/5xx) keepserror: string— that is correct per the Fiskaly spec (HTTP error responses use a plain string like"Bad Request").🤖 Generated with Claude Code