ConservationMetrics / mapgl-tile-renderer

Headless Node.js Maplibre-GL renderer for generating MBTiles with styled raster tiles.
MIT License
12 stars 3 forks source link

Wrap message processing block in try/catch statement #58

Closed rudokemper closed 4 months ago

rudokemper commented 4 months ago

Closes #57.

Goal

To handle edge cases where there is an issue decoding and parsing the incoming message; in such cases, the message would be stuck in a phantom state as they would not be deleted by the worker.

What I changed

Wrap the entire message processing code in a try/catch block, with errors being logged and the message being deleted from the queue.