package response import ( "github.com/gogf/gf/v2/errors/gcode" "github.com/gogf/gf/v2/errors/gerror" ) // Error creates an error carrying a stable application code for global response handling. func Error(code int, message string) error { return gerror.NewCode(gcode.New(code, message, nil), message) }