def get_order_dir(field, default='ASC'):
    dirn = ORDER_DIR[default]
    if field[0] == '-':
        return field[1:], dirn[1]
    return field, dirn[0]
Parse errors from the response body.
dataset/ETHPy150Open django/django/django/db/models/sql/query.py/get_order_dir--crossover with--dataset/ETHPy150Open apache/libcloud/libcloud/compute/drivers/cloudsigma.py/CloudSigma_2_0_Response._parse_errors_from_body