OpenMined / PyDentity

A repository for leveraging Self-Sovereign Identity in applications
65 stars 25 forks source link

Require Try Except handling around webhooks #66

Closed wip-abramson closed 3 years ago

wip-abramson commented 3 years ago

Description

Currently if the webhook handler functions the user of this library defines throw an error, this breaks the entire application stack including the agent.

This is bad. Probably the agent should also not break like this, but we can and should handle this in the basic controller by wrapping this in a try, except code block. This is probably something we should look at throughout the code.

How to Reproduce

  1. Run any of the docker compose setups in tutorial or projects
  2. Open one of the notebooks
  3. Define a handler function that intentionally errors
  4. Cause that handler function to be triggered (most easiest is the connection handler which is triggered through the create_invitation() function)

Expected Behavior

We should handle the error gracefully, this is an easy but important fix.