Skip to content

Redundant Error Wrapping in errors.go #272

@jmesout

Description

@jmesout

Redundant Error Wrapping in errors.go

Severity: Medium
File: errors.go
Location: Lines 297-319

Description

The custom wrapError type and wrap method create nested errors, but Go's standard errors package already provides Unwrap and Is functionality. This custom implementation is redundant and conflicts with standard error handling practices.

Suggested Fix

Remove custom error wrapping and use standard errors package functionality:

// Replace custom wrapping with:
return fmt.Errorf("%w: %v", constError(err.msg), inner)

Labels: bug, refactor

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