Skip to content

transform_error's format_exception parameter is not passed down recursively #389

@oc-ben-ellis

Description

@oc-ben-ellis
  • cattrs version: 23.1.2
  • Python version: 3.10.9
  • Operating System: WSL2 - Ubuntu

Description

I'd expect when I call,

transform_error(ex, format_exception=my_format_exception_handler)

I would expect my_format_exception_handler callable to be called and the return value applied to to all exceptions.

However, as it recursively calls itself without passing on the format_exception parameter, it uses the default format_exception callable instead of the one I passed in.

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