it's quite unusual to raise exceptions defined in other libraries, but it kind of works here, so ok