Skip to content
New issue

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

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

Already on GitHub? # to your account

tilelive.serialize() should throw on invalid Tile obj #117

Open
ian29 opened this issue Feb 26, 2015 · 2 comments
Open

tilelive.serialize() should throw on invalid Tile obj #117

ian29 opened this issue Feb 26, 2015 · 2 comments

Comments

@ian29
Copy link

ian29 commented Feb 26, 2015

if you feed tilelive.serialize() some poorly formatted Tiles, it sliently skips over them. instead of silently skipping bad stream input, tilellive should probably error or at least warn when you're feeding it bad stuff.

@ian29
Copy link
Author

ian29 commented Feb 26, 2015

erps, meant to point at this bit in particular:
https://github.com/mapbox/tilelive.js/blob/master/lib/stream-serialize.js#L22

@rclark
Copy link
Contributor

rclark commented Feb 26, 2015

I agree -- I think the stream should emit an error in this situation, just like regular streams do if objectMode: false and it receives a non-string/buffer.

yhahn added a commit that referenced this issue Dec 28, 2017
…ing newlines to make serialtiles appending more palatable.

Also adds error handling for bad data passed for serialization - refs #117.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants