mapbox / mapbox/mapnik-omnivore
Don't swallow error messages
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 44
- Forks
- 17
- PR merge metrics
- No merged PRs in 30d
Description
Debugging a Mapbox Studio Classic and a KML problem, I came across this error message

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:

May I suggest to augment the custom error message with the original error message?
e.g. change
``` js
return invalid('OGR source missing extent');
```
to
``` js
return invalid('OGR source missing extent: ' + err);
```
https://github.com/mapbox/mapnik-omnivore/blob/ce7f47af9135acdc144991d5ba27469d76e5649f/lib/ogr.js#L55
/cc @GretaCB
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read lib/ogr.js at the referenced line around the invalid('OGR source missing extent') call and trace the original error value available there. Preserve that original message in the custom error, then verify that the reported OGR error includes the underlying GDAL failure rather than only the generic extent message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100