mirror of
https://github.com/protomaps/PMTiles.git
synced 2026-02-04 02:41:09 +00:00
lambda: better error reporting for misconfiguration
This commit is contained in:
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user