microerr

package
v4.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: LGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ErrStyleSimple 简易模式错误输出样式。通常用于面向最终用户输出,本样式隐藏内部错误信息。
	ErrStyleSimple = "microsimple"
	// ErrStyleDetailed 详细模式错误输出样式。通常用于面向开发者或系统运维人员输出,本样式输出内部错误信息。
	ErrStyleDetailed = "microdetailed"
	// ErrStyleRaw Micro原始错误输出样式。
	ErrStyleRaw = "raw"
)

错误样式

View Source
const (
	ErrorStyleMetaKey      = "x-err-style"       // Metadata key / HTTP Header
	ApplicationErrorStatus = "Application Error" // 错误状态
	ApplicationErrorCode   = 520                 // 错误状态码
)

Variables

This section is empty.

Functions

func MicroErrWrapper

func MicroErrWrapper(fn server.HandlerFunc) server.HandlerFunc

Types

This section is empty.

Jump to

Keyboard shortcuts

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