Start_index field is sometimes returned as String instead of Int

Paging through a result set is sometimes returning a String instead of Int for the start_index field. Besides being silly, this can break client code that relies on a cast to Int there.

This request produces an Int:

...
"start_index": 0,
...

This request produces a String:

...
"start_index": "50",
...

Agreed - and since start_index starts from zero looks like you’ve found the equivalent of a stack overflow… :wink:

I think there are still outstanding bugs in the opposite direction e.g. when items_per_page and start_index are very small - see this thread:

If you wave at one of the Companies House folks (use “@” with one of their usernames) that might attract their attention faster - not sure?

Good luck

1 Like