aws-glue-schema-registry-python
aws-glue-schema-registry-python copied to clipboard
Request to surface errors from AWS
Hello! When running code in client.py, I was getting the generic error message Exception occurred while fetching or registering schema definition but didn't know why. When I recreated the error, it turned out there was a permissions error from AWS that the client was swallowing. I'd love to surface that error to help with debugging in the case where we don't know the cause, something like this:
raise SchemaRegistryException(
'Exception occurred while fetching or registering schema'
f' definition = {definition}, schema name = {schema_name}: {e}'
) from e
If that seems good, I'm happy to put up a PR.
More informative errors messages are a plus in my book. Minor note that it looks like bubbling up the error in that snippet would have to start in at least the get_schema_by_definition function.