def get_error_message(response):
    """Gets an error message for a response."""
    response_json = response.json()
    message = response_json.get('error') or response_json.get('message')
    message = message if message else ''
    return ' Message: {message}'.format(message=message)