cli
cli copied to clipboard
Show more clear error when token cannot query some API
If we get a 401 due to using a token that doesn't have permissions for that API, we should show a better error. Here's what we currently show:
$ ipinfo AS63989
err: GET https://ipinfo.io/AS63989: 401 { }
We should show an error similar to the one shown when you have no token at all:
$ ipinfo logout
logged out
$ ipinfo AS63989
err: ASN lookups require a token; login via `ipinfo login`.