microerr

package
v2.15.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: LGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ErrStyleSimple 简易模式错误输出样式。通常用于面向最终用户输出,本样式隐藏内部错误信息。
	ErrStyleSimple = "microsimple"
	// ErrStyleDetailed 详细模式错误输出样式。通常用于面向开发者或系统运维人员输出,本样式输出内部错误信息。
	ErrStyleDetailed = "microdetailed"
	// ErrStyleDetailed 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