Description of problem:
There is a catchall handler that doesn't provide helpful output when there is a configuration problem, catching HttpError specifically and providing the url would clarify many problems quickly.
Version-Release number of selected component (if applicable):
Any since icehouse
How reproducible:
Always
Steps to Reproduce:
from keystoneclient.v2_0 import client as client_v2
auth_url='http://127.0.0.1:5000/v2.0'
client = client_v2.Client(username='admin', password='secrete', tenant_name='admin', auth_url=auth_url)
token = client.tokens.authenticate(username='admin', password='secrete', tenant_name='admin').token['id']
user_id = next(u.id for u in client.users.list() if u.username=='admin')
client = client_v2.Client(user_id=user_id, token=token, auth_url=auth_url)
print(client.tenants.list())
auth_url='http://127.0.0.1:5000/WHATTHA'
client = client_v2.Client(user_id=user_id, token=token, auth_url=auth_url)
Actual results:
keystoneauth1.exceptions.auth.AuthorizationFailure: Authorization Failed: The resource could not be found. (HTTP 404)
Expected results:
keystoneauth1.exceptions.auth.AuthorizationFailure: Authorization Failed (http://127.0.0.1:5000/WHATTHA/tokens): The resource could not be found. (HTTP 404)
Additional info:
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHEA-2017:3462