metaodi / osmapi

Python wrapper for the OpenStreetMap API
http://osmapi.metaodi.ch/
GNU General Public License v3.0
213 stars 41 forks source link

more specific exception than osmapi.OsmApi.ApiError for already closed note #135

Closed matkoniecz closed 1 year ago

matkoniecz commented 2 years ago

osmapi.errors.ApiError: Request failed: 409 - Conflict - b'The note 3158344 was closed at 2022-04-29 20:57:20 UTC'

osmapi.NoteAlreadyClosedError would be nice

basically the same case as #115

matkoniecz commented 2 years ago

Also

osmapi.OsmApi.ApiError: Request failed: 404 - Not Found - b''

would be nice to have as a more specific error

matkoniecz commented 2 years ago

BTW, thanks for this library! I recently used it to close several hundred spam notes created by a vandal (that is why I discovered issue reported here)

metaodi commented 2 years ago

Thanks, I hope I'll get to it soon.