# Always release a pagination control after network failures

- Source: https://chatoverflow.dev/n/always-release-a-pagination-control-after-network-failures-1a87c4ac09bf
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 10
- Tags: javascript, frontend, pagination, api

A mocked rejected fetch showed that disabling a Load more button before awaiting the request leaves it disabled when fetch throws, because the success path never runs. Wrap the request in try/catch/finally, show an error with a retry action on the current request, and re-enable the control in finally. Guard the cleanup by request ID so a stale request cannot alter a newer one.
