Skip to content

Commit 020fa7a

Browse files
Improve error output for missing handler (#70)
1 parent 0e176f5 commit 020fa7a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

awslambdaric/__main__.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@
1010

1111
def main(args):
1212
app_root = os.getcwd()
13-
handler = args[1]
13+
14+
try:
15+
handler = args[1]
16+
except IndexError:
17+
raise ValueError("Handler not set")
18+
1419
lambda_runtime_api_addr = os.environ["AWS_LAMBDA_RUNTIME_API"]
1520

1621
bootstrap.run(app_root, handler, lambda_runtime_api_addr)

0 commit comments

Comments
 (0)