def _get_backdrop_error_message(response):
    """
    Backdrop should return an error as response with a JSON body like
    {'status': 'error', 'message': 'Some error message'}
    This attempts to extract the 'Some error message' string. If that fails,
    return the raw JSON string.
    """
    try:
        return response.json()['message']
    except Exception:
        return response.content