safeerr

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package safeerr provides errors that preserve a cause without exposing its potentially credential-bearing text through Error.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Wrap

func Wrap(message string, cause error) error

Wrap preserves cause for errors.Is and errors.As while exposing only message.

Types

type Error

type Error struct {
	// contains filtered or unexported fields
}

Error wraps an error with safe public text.

func (*Error) Error

func (e *Error) Error() string

Error returns text that is safe to log.

func (*Error) Unwrap

func (e *Error) Unwrap() error

Unwrap returns the original error for programmatic inspection.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL