Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't swallow error messages #125

Open
wilhelmberg opened this issue Oct 6, 2015 · 6 comments
Open

Don't swallow error messages #125

wilhelmberg opened this issue Oct 6, 2015 · 6 comments

Comments

@wilhelmberg
Copy link
Contributor

Debugging a Mapbox Studio Classic and a KML problem, I came across this error message

image

which led me to believe the data was faulty and investigate in that direction, when in reality it seems that in the context of Mapbox Studio Classic and KMLs mapnik-omnivore/node-srs/node-gdal are not able to find the gdal support files:

image

May I suggest to augment the custom error message with the original error message?
e.g. change

return invalid('OGR source missing extent');

to

return invalid('OGR source missing extent: ' + err);

} catch (err) { return invalid('OGR source missing extent'); }

/cc @GretaCB

@wilhelmberg
Copy link
Contributor Author

I haven't looked through the whole code, but it would be really great, if all similar error handling routines could be changed (if there are any others 😏)

@springmeyer
Copy link
Contributor

The error message suppression is intentional. My understanding is that @rclark and @GretaCB decided to do this in order to sanitize/collapse all Mapnik and GDAL errors down to very simple messages that are also "Safe" and do not expose user info. But I definitely agree with you @BergWerkGIS that this adds an annoying friction and slowness to debugging for us - the developers trying to figure out where the generic error message is coming from. I think we should revisit this overall. One idea would be to add a verbose mode to mapnik-om such that all the raw Mapnik and GDAL errors that are suppressed are printed to stderr along with the err.stack.

@mannylopez
Copy link

I don't know if this is related but when trying to upload run.gpx I also get Error: OGR source missing extent.

I was able to upload the same file via the uploads page so the data is good.

@mannylopez
Copy link

Digging a bit deeper it looks like mapbox/mapbox-studio-classic#1473 is a better place to post this. Sorry for the noise!

@GretaCB
Copy link
Contributor

GretaCB commented Dec 10, 2015

Thanks @mannylopez , I can use run.gpx as a test-case to clean this up a bit. Happen to have any other files you know that run into this error?

hey @BergWerkGIS , what file were you using to run into this error? I can take a look at some test-cases and roll something new out with the original error (if it doesn't reveal sensitive server info).

@GretaCB
Copy link
Contributor

GretaCB commented Dec 10, 2015

@springmeyer This could be great:

I think we should revisit this overall. One idea would be to add a verbose mode to mapnik-om such that all the raw Mapnik and GDAL errors that are suppressed are printed to stderr along with the err.stack.

I can play around with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants