@staticmethod
def _get_error(response):
    """Get error message from API response

        :param dict response: API response
        :return: Error message as :func:`str`
        """
    if 'error' in response:
        err = response.get('error')
    elif 'errors' in response:
        err = response.get('errors')
    else:
        err = 'No error message found'
    return err
