Make sure ValueError is correctly thrown instead of re-throwing it as
MalformedResponseError.
@@ -1563,9 +1563,11 @@ class OpenStackIdentity_3_0_Connection_OIDC_access_token(
if self.domain_name in [project['name'],
project['id']]:
return project['id']
- raise ValueError('Project %s not found' % self.domain_name)
+ raise ValueError('Project %s not found' % (self.domain_name))
else:
return body['projects'][0]['id']
+ except ValueError as e:
+ raise e
except Exception as e:
raise MalformedResponseError('Failed to parse JSON', e)
else:
