Closed cetooley closed 4 years ago
Hello! I found what I think is a bug with tilesets-cli:
(for: tilesets-1.0.0.dev0)
When making a request with tilesets-cli to delete a source (i.e. tilesets delete-source ...) tilesets-cli raises a TilesetsError upon a successful deletion.
tilesets delete-source ...
TilesetsError
Looking at cli.py, the response status code is expected to be 201 for a successful delete when the mapbox api documentation states 204 is the response for a successful deletion: https://docs.mapbox.com/api/maps/#response-delete-a-tileset-source
cli.py
Doing some rudimentary hacking suggests a fix would be to modify delete_source to expect a 204 status_code on Line 387 instead of 201: https://github.com/mapbox/tilesets-cli/blob/master/mapbox_tilesets/scripts/cli.py#L387
delete_source
204
201
I would expect a successful request would not raise any errors, so I think this is a bug :)
This should now be fixed and is released in v1.0.1-dev0
v1.0.1-dev0
Hello! I found what I think is a bug with tilesets-cli:
(for: tilesets-1.0.0.dev0)
When making a request with tilesets-cli to delete a source (i.e.
tilesets delete-source ...
) tilesets-cli raises aTilesetsError
upon a successful deletion.Looking at
cli.py
, the response status code is expected to be 201 for a successful delete when the mapbox api documentation states 204 is the response for a successful deletion: https://docs.mapbox.com/api/maps/#response-delete-a-tileset-sourceDoing some rudimentary hacking suggests a fix would be to modify
delete_source
to expect a204
status_code on Line 387 instead of201
: https://github.com/mapbox/tilesets-cli/blob/master/mapbox_tilesets/scripts/cli.py#L387I would expect a successful request would not raise any errors, so I think this is a bug :)