Hi,
I’m using python SDK and I can’t extract errorCode from ‘OktaAPIException’ object.
The code below is failing with AttributeError: ‘OktaAPIException’ object has no attribute ‘errorCode’:
try:
loop.run_until_complete(some_function())
except OktaAPIException as error:
print(error.errorCode)
error object is shown below:
{'errorCode': 'E0000001', 'errorSummary': 'Api validation failed: name', 'errorLink': 'E0000001', 'errorId': 'xxxxxxxxxxxxxxxx', 'errorCauses': [{'errorSummary': 'name: An object with this field already exists in the current organization'}]}