fix(agent): wrap transport errors in FireflyError
This commit is contained in:
@@ -47,3 +47,11 @@ def test_accounts_walks_all_pages():
|
||||
|
||||
accounts = make_client(handler).accounts()
|
||||
assert [a["attributes"]["name"] for a in accounts] == ["NFCU Checking", "Venmo"]
|
||||
|
||||
|
||||
def test_transport_errors_wrapped_in_firefly_error():
|
||||
def handler(request: httpx.Request) -> httpx.Response:
|
||||
raise httpx.ConnectError("connection refused")
|
||||
|
||||
with pytest.raises(FireflyError, match="ConnectError"):
|
||||
make_client(handler).about()
|
||||
|
||||
Reference in New Issue
Block a user