mapbox / mapbox/mapnik-omnivore
Improved error message when mapnik-om encounters an unknown filetype
- Dominant language
- JavaScript
- Stars
- 44
- Forks
- 17
- PR merge metrics
- No merged PRs in 30d
Description
Calling `digest` on an sqlite file (seen with 6.1.4) leads to:
```
Error: Error creating Mapnik Datasource: undefined is not a function
```
Ideally this message would be more like:
```
Error: encountered unsupported file type (sqlite)
```
Because the `undefined is not a function` error is actually a JS issue and the error is not actually coming from Mapnik.
Context is: Mapnik supports reading sqlite databases representing geodata (like postgis: rows of data with a column for the geometry): https://github.com/mapnik/mapnik/wiki/SQLite. I'm poking around omnivore looking at whether it would be reasonable to support sqlite out of the box and ran into this issue which seems worthy of fixing overall.
Contributor guide
Research direction
Reproduce the issue by calling `digest` on an SQLite file, then trace the unsupported-filetype error path in the repository. Update the error handling so SQLite reports an unsupported file type instead of the JavaScript exception, and verify the resulting message against the example in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100