Error codes / 1526
EFRIS error 1526 — pageSize must be 99 or less
Paged queries reject a pageSize of 100 even though the field description permits it. Use 99 or fewer.
The documentation says the value cannot be greater than 100. The live service rejects 100. Use 99.
What it actually means
The bound is exclusive in practice where the specification reads it as inclusive. It applies across the paged interfaces — goods and services (T127), stock records, transfer records and the other list queries.
The fix
Cap page size at 99 wherever you page, and prefer a smaller page for large result sets: paging is cheap, and a rejected page costs a whole round trip.
PAGE_SIZE = 99 # 100 is rejected with 1526
page = 1
while True:
result = client.query_goods_and_services(
page_no=page, page_size=PAGE_SIZE,
)
records = result.get("records", [])
if not records:
break
yield from records
page += 1
Why this happens
Do not silently truncate a caller's requested page size to fit. The page count returned by URA is derived from the size actually used, so quietly changing it corrupts the arithmetic a paginating caller depends on.
Related
- Error 15 — Data decryption error — the session key expired; redo T104
- Error 1304 — summary.itemCount must exclude discount lines
- All EFRIS error codes
The EFRIS API Kit handles this case already — it is one of the rejections the library was calibrated against. This page stays free either way.