Improve exception handing logic of deploy-agent cleanup (#502)
Improve exception handing logic of deploy-agent cleanup (#502)

* Separate exception handlers

* Add comments, catch base exception class

* Catch BaseException, just in case

* Handle logs with `log.exception()` to get better traces

* fix type

lilida/teletraan,yongwen/teletraan,pinterest/teletraan,lilida/teletraan,lilida/teletraan,yongwen/teletraan,pinterest/teletraan,brennentsmith/teletraan,brennentsmith/teletraan,lilida/teletraan,brennentsmith/teletraan,pinterest/teletraan,brennentsmith/teletraan,pinterest/teletraan,lilida/teletraan,yongwen/teletraan,pinterest/teletraan,yongwen/teletraan,yongwen/teletraan,yongwen/teletraan,lilida/teletraan,brennentsmith/teletraan,brennentsmith/teletraan