* feat(upload): state-based retry tracking and resilient gateway error handling * fix(upload): check non-retryable statuses before offline state in isNetworkIssue