-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
Is there a way to capture errors thrown by the render function?
In the following code, the render function throws an error (because my DB is not working), the server correctly returns a 500 error which also is logged in the console. I just want to capture this error so I can send it to Sentry, but using the normal express error handler middleware doesn't seem to work.
app.server.use((err, req, res, next) => {
// NEVER GETS CALLED
});
app.layer("test_layer", function(tile, render) {
render(
"SELECT ST_AsGeoJSON(geom) as the_geom_geojson FROM mn_places WHERE ST_Intersects(geom, !bbox_4326!)"
);
});Is there a way to do this?
Thanks
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels