Exemplo n.º 1
0
def bad_request(err):
    """
    Generates a 400 bad request page.

    @param err: Error information.
    @return: Response.
    """
    return error_response('400', 'BadRequest', 'Bad Request')
def not_found(err):
    """
    Generates a 404 not found page.

    @param err: Error information.
    @return: Response.
    """
    return error_response("404", "NotFound", "Page not found")
Exemplo n.º 3
0
def not_found(err):
    """
    Generates a 404 not found page.

    @param err: Error information.
    @return: Response.
    """
    return error_response('404', 'NotFound', 'Page not found')
def bad_request(err):
    """
    Generates a 400 bad request page.

    @param err: Error information.
    @return: Response.
    """
    return error_response("400", "BadRequest", "Bad Request")
Exemplo n.º 5
0
def not_found(err):
    """
    Generates a 404 not found page.

    @param err: Error information.
    @return: Response.
    """
    return error_response('404', 'NotFound', 'Page not found')
Exemplo n.º 6
0
def index():
    """
    URL entry point. Parses the Action parameter and executes the associated
    functions to generate a response.

    @return: Response.
    """
    try:
        response_data = _get_action(get('Action'))()
        return successful_response(**response_data)
    except Ec2stackError as err:
        return error_response(err.code, err.error, err.message)
def index():
    """
    URL entry point. Parses the Action parameter and executes the associated
    functions to generate a response.

    @return: Response.
    """
    try:
        response_data = _get_action(get("Action"))()
        return successful_response(**response_data)
    except Ec2stackError as err:
        return error_response(err.code, err.error, err.message)
Exemplo n.º 8
0
def index():
    try:
        response_data = _get_action(get('Action'))()
        return successful_response(**response_data)
    except Ec2stackError as err:
        return error_response(err.code, err.error, err.message)
Exemplo n.º 9
0
def bad_request(err):
    return error_response('400', 'BadRequest', 'Bad Request')
Exemplo n.º 10
0
def not_found(err):
    return error_response('404', 'NotFound', 'Page not found')
Exemplo n.º 11
0
def index():
    try:
        response_data = _get_action(get('Action'))()
        return successful_response(**response_data)
    except Ec2stackError as err:
        return error_response(err.code, err.error, err.message)
Exemplo n.º 12
0
def bad_request(err):
    return error_response('400', 'BadRequest', 'Bad Request')
Exemplo n.º 13
0
def not_found(err):
    return error_response('404', 'NotFound', 'Page not found')