beatleboy501 / tilelive-aws

I am a AWS Location Service style source for tilelive. I handle aws://path/to/style-json URIs.
1 stars 1 forks source link

No error thrown for missing AWS_REGION variable #2

Open brt0555 opened 2 years ago

brt0555 commented 2 years ago

Current behavior: When all AWS variables all set except AWS_REGION, for example:

export AWS_ACCESS_KEY_ID=xxx
export AWS_SECRET_ACCESS_KEY=xxx
export AWS_DEFAULT_REGION=xxx

It does not return tiles. There is no response:

Listening at http://0.0.0.0:8080
GET /4/2/9.pbf - - ms - -
GET /4/3/9.pbf - - ms - -
GET /4/4/9.pbf - - ms - -
GET /4/5/9.pbf - - ms - -
GET /4/4/8.pbf - - ms - -
GET /4/5/7.pbf - - ms - -
GET /4/5/8.pbf - - ms - -
GET /4/6/8.pbf - - ms - -
GET /4/4/7.pbf - - ms - -
GET /4/6/7.pbf - - ms - -

After changing AWS_DEFAULT_REGION to AWS_REGION it starts working.

Expected behavior: Inform about missing AWS_REGION or use AWS_DEFAULT_REGION if it was provided.

Issue related with https://github.com/mojodna/tessera/issues/103

mojodna commented 2 years ago

I think there’s some missing error handling when calling GetMapTile against resources that don’t exist which prevents the callback from ever firing, hence the apparent hangs. Logging the error message (in addition to failing the request) should help users debug the issue on their own.