in source/lambda_function.py [0:0]
def handle_exception(exception, request_route, request_token):
try:
raise exception
except CustomException as e:
write_s3_get_object_error(e.status_code, e.s3_error_code, e.error_message, request_route, request_token)
except Exception as e:
write_s3_get_object_error(500, 'InternalError', 'An unexpected internal error occured', request_route, request_token)