Skip to content

Conversation

@gsilvan
Copy link
Contributor

@gsilvan gsilvan commented Nov 28, 2025

4PX tracking fails if 4PX API returns 'tkTimezone':null in tracks[].

Failure(com.squareup.moshi.JsonDataException: Non-null value 'tkTimezone' was null at $.data[0].tracks[7].tkTimezone)

Example: 4PX3002235116157CN (https://track.4px.com/#/result/0/4PX3002235116157CN)

{
  "tkCode": "FPX_I_RCUK",
  "tkDesc": "Released from customs: customs cleared.",
  "tkLocation": "",
  "tkTimezone": null,
  "tkDate": "2025-11-22T05:30:00.000+0000",
  "tkDateStr": "2025-11-22 13:30:00",
  "tkCategoryCode": "I",
  "tkCategoryName": "Import Clearance",
  "spTkSummary": null,
  "spTkZipCode": null,
  "tkTranslatedDesc": "Released from customs: customs cleared.",
  "tkTranslatedSummary": null,
  "sigPicUrl": null,
  "isSigPic": null
}

Proposed fix: make val tkTimezone optional.

@gsilvan gsilvan changed the title fix: JsonDataException when 4PX returns 'tkTimeStamp':null fix: JsonDataException when 4PX returns 'tkTimezone':null Nov 28, 2025
Copy link
Owner

@itsvic-dev itsvic-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@itsvic-dev itsvic-dev merged commit a4e0165 into itsvic-dev:master Dec 8, 2025
2 checks passed
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.

2 participants