<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def check_error_response(self, body, status):
 """Raise an exception if the response from the backend was an error. Args: body: A string containing the backend response body. status: A string containing the backend response status. Raises: BackendError if the response is an error. """

    status_code = int(status.split(' ', 1)[0])
    if status_code >= 300:
      raise errors.BackendError(body, status)