zenpy icon indicating copy to clipboard operation
zenpy copied to clipboard

Can we have APIException inherit from ZenpyException?

Open jhorowitz opened this issue 2 years ago • 1 comments

It'd be nice if there was one singular exception which we could catch to handle all forms of exceptions from Zenpy. Every exception in lib.exception inherits from ZenpyException except for APIException which inherits directly from Exception. I think anyone catching ZenpyException would probably want it to catch APIException as well.

If you agree, I'd be happy to make a PR to implement it. I've been using the library a lot so I'd like to contribute back and help improve it. This seems like a good first PR!

jhorowitz avatar Sep 24 '22 20:09 jhorowitz

Sometimes I read the backlog. Then sometimes I get sad because this has lied fallow. I think this is a great idea. If you want to get involved and do that I'd:

  1. Make the change
  2. See if the tests pass
  3. Submit the PR Screenshot 2023-09-19 at 6 55 23 AM

cryptomail avatar Sep 19 '23 13:09 cryptomail