Skip to content

Commit

Permalink
update error message output
Browse files Browse the repository at this point in the history
  • Loading branch information
EndoNrak committed Oct 7, 2023
1 parent 3c8cda8 commit 37734fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

FRONTEND_ORIGIN = os.environ["FRONTEND_ORIGIN"]
LAMBDA_TASK_ROOT = os.environ["LAMBDA_TASK_ROOT"]
SUBPROCESS_TIMEOUT_LIMIT = 30
SUBPROCESS_TIMEOUT_LIMIT = 60


def lambda_handler(event: dict, context):
Expand Down Expand Up @@ -45,10 +45,10 @@ def evaluation(event: dict, context):
"Content-Type": "text/plain",
},
}
except subprocess.CalledProcessError:
except subprocess.CalledProcessError as e:
response = {
"statusCode": 400,
"body": "Runtime error",
"body": f"Runtime error\n{e.stderr.decode('utf-8')}",
"headers": {
"Content-Type": "text/plain",
},
Expand Down
2 changes: 1 addition & 1 deletion cloud/sam/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ Resources:
DockerTag: latest
Properties:
PackageType: Image
Timeout: 10
Timeout: 60
Events:
PostTetrisTrainingCodeEndpoint:
Type: Api
Expand Down

0 comments on commit 37734fb

Please sign in to comment.