code: def validate_response(self):
          
          if self.is_success():
              return
  
          # Handle the error if we have any information
          if self.details:
              error = self.details.get('error', None)
  
              if error == PushResponse.ERROR_DEVICE_NOT_REGISTERED:
                  raise DeviceNotRegisteredError(self)
              elif error == PushResponse.ERROR_MESSAGE_TOO_BIG:
                  raise MessageTooBigError(self)
              elif error == PushResponse.ERROR_MESSAGE_RATE_EXCEEDED:
                  raise MessageRateExceededError(self)
  
          # No known error information, so let's raise a generic error.
          raise PushResponseError(self)
docs: Raises an exception if there was an error. Otherwise, do nothing.
  
          Clients should handle these errors, since these require custom handling
          to properly resolve.