lambda: better error reporting for misconfiguration

This commit is contained in:
Brandon Liu
2022-08-02 19:54:39 -07:00
parent 5d841713ba
commit bf813a75e9

View File

@@ -50,6 +50,12 @@ def lambda_handler(event, context):
# Lambda Function URL # Lambda Function URL
path = event.get("rawPath") path = event.get("rawPath")
if not path:
return {
"statusCode": 500,
"body": "Invalid event configuration",
}
name, tile = parse_tile_path(os.environ.get("TILE_PATH"), path) name, tile = parse_tile_path(os.environ.get("TILE_PATH"), path)
if not tile: if not tile: