Skip to content

DEV: Catch exception in operation handler #34

@ruscoder

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)

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