Incomplete archive TGZ download

I have a gitea instance where I’m using the API call to download an archive and occasionally I’ve had the downloaded archive be incomplete. I haven’t seen obvious errors in the logs to explain this one. Any tips on what would create this situation?