What are the default REST query failure conditions?

This isn't covered in the documentation--I'd expect the entire 4xx & 5xx to be failures, but is 202 also a failure? Are 3xx failures too? Can this be overridden?

Got a response from staff in chat:

All 2xx response codes are success conditions and everything else is a failure. You can actually define your own "Failure Conditions" if you want, there's some documentation on that here. Let me know if this answers your question!