This PR resolves Connection reset by peer error by first validating the source id, if it's not in a correct format a friendly error message will be thrown.
Tests
Tested by passing incorrect source-id when using upload-source command
tilesets upload-source username mapbox://tileset-source/username/populated-places-source ./populated_places.geojson.ld
Error: Invalid value for 'ID': Tileset Source ID is invalid. Must be no more than 32 characters and only include "-", "_", and alphanumeric characters.
Successfully uploaded a new source id, created and published a new tileset
tilesets create username.new-source-id --recipe ./recipe.json --name "big cities"
{"message": "Successfully created empty tilesetusername.new-source-id. Publish your tileset to begin processing your data into vector tiles."}
Summary
This PR resolves
Connection reset by peer
error by first validating the source id, if it's not in a correct format a friendly error message will be thrown.Tests
Tested by passing incorrect
source-id
when usingupload-source
commandSuccessfully uploaded a new source id, created and published a new tileset