Checking response class before calling .status, as this was being called in some places on error responses, thereby triggering the deprecation warning.
.status