Example #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")
Example #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")
Example #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')
Example #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)
Example #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)
Example #9
0
def bad_request(err):
    return error_response('400', 'BadRequest', 'Bad Request')
Example #10
0
def not_found(err):
    return error_response('404', 'NotFound', 'Page not found')
Example #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)
Example #12
0
def bad_request(err):
    return error_response('400', 'BadRequest', 'Bad Request')
Example #13
0
def not_found(err):
    return error_response('404', 'NotFound', 'Page not found')