clientsafe

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2020 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package clientsafe provides an error type that is safe to show to clients.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error interface {
	error

	//ClientError returns an error string that is safe to show the client.
	ClientError() string
}

Error is a clientsafe error, that is an error that is safe to show to the client. You don't want to expose sensitive-information inside of an error message.

func Err

func Err(internal error, format string, args ...interface{}) Error

Err returns a new clientsafe.Error that wraps the given internal error. format and args are passed to fmt.Sprintf

Jump to

Keyboard shortcuts

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