diff options
Diffstat (limited to 'firefly_cli/resolver.py')
| -rw-r--r-- | firefly_cli/resolver.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/firefly_cli/resolver.py b/firefly_cli/resolver.py index 2a73e79..7296aad 100644 --- a/firefly_cli/resolver.py +++ b/firefly_cli/resolver.py @@ -30,7 +30,10 @@ class Resolver: def account_by_id(self, acc_id): # Escape hatch for same-name accounts (ISSUES.md #2): GET the account - # directly; a bad id 404s and client.request surfaces a FireflyError. + # directly; a bad id errors and client.request surfaces a FireflyError. + # ponytail: Firefly returns 401 (not 404) for an unknown account id, so + # the message reads "Unauthenticated"; the write is still blocked, which + # is what matters. Remap to "account not found" only if it confuses users. item = self.client.request("GET", f"/api/v1/accounts/{acc_id}")["data"] return {"id": item["id"], **item.get("attributes", {})} |
