jkwill87 / mapi

media metadata database library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Raise MapiNetworkException instead of AssertionError

jkwill87 opened this issue · comments

Background

When mapi fails because of a network or API provider related error it can result in an AssertionError or in raising one of request's exceptions. While during development it might have made sense to presuppose that these services would always be up, in reality this is not a guarantee (looking at you TVDb). In order to handle these situations more gracefully mapi should restrict itself to raising a single exception type, MapiNetworkException.

Acceptance Criteria

  • Raise MapiNetworkException on unsuccessful query
  • Raise MapiNetworkException on network failure