check response codes