def validate_response(self):
if self.is_success():<EOL><INDENT>return<EOL><DEDENT>if self.details:<EOL><INDENT>error = self.details.get('<STR_LIT:error>', None)<EOL>if error == PushResponse.ERROR_DEVICE_NOT_REGISTERED:<EOL><INDENT>raise DeviceNotRegisteredError(self)<EOL><DEDENT>elif error == PushResponse.ERROR_MESSAGE_TOO_BIG:<EOL><INDENT>raise MessageTooBigError(self)<EOL><DEDENT>elif error == PushResponse.ERROR_MESSAGE_RATE_EXCEEDED:<EOL><INDENT>raise MessageRateExceededError(self)<EOL><DEDENT><DEDENT>raise PushResponseError(self)<EOL>
Raises an exception if there was an error. Otherwise, do nothing.

        Clients should handle these errors, since these require custom handling
        to properly resolve.