I am using the IBM Cloud Platform Services Python SDK to work with access management tags. For that I am following the Python example to create a tag:
create_tag_results = global_tagging_service.create_tag(
tag_names=['env:example-access-tag'],
tag_type='access').get_result()
print(json.dumps(create_tag_results, indent=2))
I received an error, so I want to catch the exception and print the error message. How can I do that?