WebOfTrust / keripy

Key Event Receipt Infrastructure - the spec and implementation of the KERI protocol
https://keripy.readthedocs.io/en/latest/
Apache License 2.0
60 stars 55 forks source link

MissingDelegableApprovalError logging bug #787

Closed 2byrds closed 5 months ago

2byrds commented 5 months ago

Version

1.2.0-dev4

Environment

MacOS, Python 3.12.2, KERIA CI/CD

Expected behavior

When a MissingDelebableApprovalError is raised it should have a corresponding error message so that the loggers don't fail when logging the exception

Actual behavior

See https://github.com/WebOfTrust/keria/actions/runs/9288867098/job/25561347732?pr=248 The error is:

            except MissingDelegableApprovalError as ex:
                # still waiting on missing delegation approval
                if logger.isEnabledFor(logging.DEBUG):
                    logger.exception("Kevery unescrow failed: %s", ex.args[0])
                else:
>                   logger.error("Kevery unescrow failed: %s", ex.args[0])
E                   IndexError: tuple index out of range

Steps to reproduce

View (or rerun) the KERIA CI/CD test output here https://github.com/WebOfTrust/keria/actions/runs/9288867098/job/25561347732?pr=248 The test intentionally creates a dip that will lead to the MissingDelegableApprovalError