Skip to content

Remove toString override from ErrorPolykey #834

@tegefaulkes

Description

@tegefaulkes

Specification

Recently I added a toString override to the ErrorPolykey class as a way of extending it to include better details about the cause chain. After some discussion about it this needs to be removed infavor of an alternative method.

We need to create a utility what will structure errors as a more informative string to be used when we need to convert errors for use in logger messages. It needs to be aware of the type of error it receives and format it accordingly.

Additional context

Tasks

  1. remove the toString method from ErrorPolykey
  2. Create a utility that converts errors into formatted strings.
  3. Apply this utility wherever an error is being converted to a string with toString or the String constructor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions