Skip to content

DEV: Catch exception in operation handler #34

Description

@ruscoder

Now it's difficult to debug issues if backend fails with exception (e.g. KeyError):

@sdk.operation(..)
def operation(_, request):
    key = request['resource']['userType']
    ...

If we don't pass userType - the code fails, and Aidbox returns 500 without details.

Let's add some useful information for DEV environment (stack trace + error message)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions