failreason

package
v1.0.0-dev.2 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package failreason carries why a refusal happened beside the public sentinel a client sees, so accesshttp can audit it or name it in an error body while every caller's errors.Is and error text stay the sentinel's.

Index

Constants

View Source
const (
	// MethodLocked is a password attempt on a record already locked by the
	// failure cap; the client still sees ErrInvalidCredentials.
	MethodLocked = "method_locked"
	// ReenableNeedsOtherMethod is ReenableMethod refused for a session that
	// signed in with the method being re-enabled.
	ReenableNeedsOtherMethod = "reenable_needs_other_method"
)

Variables

This section is empty.

Functions

func Of

func Of(err error) string

Of returns the reason err carries, or "" for none.

func Wrap

func Wrap(err error, reason string) error

Wrap returns err carrying reason. The result matches err under errors.Is and has err's Error text.

Types

This section is empty.

Jump to

Keyboard shortcuts

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