Skip to content

list_networks fails: createdAt returned as ISO 8601 string, not int64 #6

Description

@kapilkanur

The list_networks tool fails with the following error when connecting to a Forward Networks instance:

  json: cannot unmarshal string into Go struct field Network.createdAt of type int64

Root Cause
Network.CreatedAt in internal/forward/client.go is typed as int64, but the
Forward Networks API returns createdAt as an ISO 8601 string:

  "createdAt": "2025-07-07T15:56:58.238500047Z"

Expected behavior
The tool should successfully decode the API response and return network data.

Fix
Change CreatedAt from int64 to string in:

  • Network struct
  • SnapshotsResponse struct

in internal/forward/client.go.

Breaking API Change
Forward Networks changed the type of createdAt between versions:

Version Type Example
≤ 26.3 integer (int64) 1649277285118
≥ 26.4 string "2022-04-06T20:34:45.118Z"

Reference: https://docs.fwd.app/26.3/api/networks/get-networks/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions