eerror

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package eerror stands for Encore Error and is used to provide a little more information about the underlying error's metadata.

It also provides helper methods for working with zerolog's context

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogWithMeta

func LogWithMeta(evt *zerolog.Event, err error) *zerolog.Event

LogWithMeta merges in the metadata from the errors into the log context

func MetaFrom

func MetaFrom(err error) map[string]any

MetaFrom will return the merged metadata from any eerror.Error objects in the errors given. It will unwrap errors as it descends

func New

func New(module string, msg string, meta map[string]any) error

New creates a new error with the given error

func WithMeta

func WithMeta(err