isPermanentSyncStatus function

bool isPermanentSyncStatus(
  1. int status
)

Whether a status code means "do not retry this payload".

Implementation

bool isPermanentSyncStatus(int status) {
  if (status == 408 || status == 429) return false;
  if (status >= 500) return false;
  return status >= 400;
}