aws-glue-schema-registry-python icon indicating copy to clipboard operation
aws-glue-schema-registry-python copied to clipboard

Request to surface errors from AWS

Open naomiajacobs opened this issue 1 year ago • 1 comments

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.

naomiajacobs avatar Jan 10 '24 18:01 naomiajacobs

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.

nickzandbergen avatar Jan 10 '24 19:01 nickzandbergen