Unless it's a 501 or another code, in which case you'd have to put in every number above 500.
That was a great repair!
Rather of being strident (status).
startswith('5') I'd go with the more straightforward integer comparison: Because there are no bigger error codes, 500 = status 600 (or simply status >= 500).