Skip to content

Improve use of error wrapping throughout message handlers #2678

@lumtis

Description

@lumtis

Describe the Issue

Example: #2630 (comment)

In many message handlers we use error wrapping in the way:

errors.Wrap([SDK defined error], [message])

for then in test use

require.ErrorIs(t, [SDK defined error], err)

This ends up in antipattern where we do:

errors.Wrap([SDK defined error], err.Error())

where err is error returned by called function.

We should refactor throughout the message handlers the way we construct and assert error, and wrap underlying errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    code-qualityCode quality improvementzetacoreIssues related to ZetaCore

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions