This might be better done as an assertion error, since the error is not with any input passed to `get_provider`