Ejemplo n.º 1
0
def get_list_object_page(request):
    try:
        return Customer(request).get_list_object_page(request)
    except PermissionDeniedException as ex:
        return base_url_mapping.send_response(None, ex.error_message, 401,
                                              ex.error_code)
    except KaroException as ex:
        return base_url_mapping.send_response(None, ex.error_message, 500,
                                              ex.error_code)
    except Exception as ex:
        return base_url_mapping.send_response(None, str(ex), 500, "ERROR001")
Ejemplo n.º 2
0
def customer_authentication(request):
    try:
        return Customer(request).customer_authentication(request)
    except PermissionDeniedException as ex:
        return base_url_mapping.send_response(None, ex.error_message, 401,
                                              ex.error_code)
    except KaroException as ex:
        return base_url_mapping.send_response(None, ex.error_message, 500,
                                              ex.error_code)
    except Exception as ex:
        return base_url_mapping.send_response(None, str(ex), 500, "ERROR001")