You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
except TransportError as e:
if e.status_code == 400 and e.error == 'resource_already_exists_exception':
# Handle the specific exception
print("Resource already exists.")
else:
# Handle other TransportError exceptions
print(f"TransportError occurred: {e}")
so i have to write a helper that converts exceptions to semantic errors:
except TransportError as e:
return transform_exception_to_return_value(e)
*** Error: RequestError(400, 'resource_already_exists_exception', 'index [opinions/FduukSQQQcuRcp4ZK0w51g] already exists')
requires:
so i have to write a helper that converts exceptions to semantic errors:
https://opensearch-project.github.io/opensearch-py/api-ref/exceptions.html#opensearchpy.TransportError
Originally posted by @rbpasker in #718 (comment)
The text was updated successfully, but these errors were encountered: