fix: Ajax -> only retry requests if network error (cherry picked from commit 5c60350d723c9bbf17544fae426d731817b0b142)