Help us shape the future of Go! Take the 2026 Go Developer Survey

errutil

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// IDs
	AlertIDKey     = goerr.NewTypedKey[types.AlertID]("alert_id")
	AlertListIDKey = goerr.NewTypedKey[types.AlertListID]("alert_list_id")
	TicketIDKey    = goerr.NewTypedKey[types.TicketID]("ticket_id")
	CommentIDKey   = goerr.NewTypedKey[types.CommentID]("comment_id")
	ActivityIDKey  = goerr.NewTypedKey[types.ActivityID]("activity_id")
	ClusterIDKey   = goerr.NewTypedKey[string]("cluster_id")
	UserIDKey      = goerr.NewTypedKey[string]("user_id")
	RequestIDKey   = goerr.NewTypedKey[string]("request_id")
	SessionIDKey   = goerr.NewTypedKey[string]("session_id")

	// Field names
	FieldKey        = goerr.NewTypedKey[string]("field")
	ParameterKey    = goerr.NewTypedKey[string]("parameter")
	FunctionNameKey = goerr.NewTypedKey[string]("function_name")

	// Values
	SeverityKey   = goerr.NewTypedKey[string]("severity")
	ReasonKey     = goerr.NewTypedKey[string]("reason")
	StatusKey     = goerr.NewTypedKey[string]("status")
	OperationKey  = goerr.NewTypedKey[string]("operation")
	RepositoryKey = goerr.NewTypedKey[string]("repository")
	CollectionKey = goerr.NewTypedKey[string]("collection")
	QueryKey      = goerr.NewTypedKey[string]("query")
	LimitKey      = goerr.NewTypedKey[int]("limit")
	OffsetKey     = goerr.NewTypedKey[int]("offset")
	CountKey      = goerr.NewTypedKey[int]("count")
	DurationKey   = goerr.NewTypedKey[time.Duration]("duration")

	// External services
	ServiceKey      = goerr.NewTypedKey[string]("service")
	EndpointKey     = goerr.NewTypedKey[string]("endpoint")
	HTTPStatusKey   = goerr.NewTypedKey[int]("http_status")
	ErrorMessageKey = goerr.NewTypedKey[string]("error_message")
	URLKey          = goerr.NewTypedKey[string]("url")

	// File and path
	FilePathKey = goerr.NewTypedKey[string]("file_path")
	LineKey     = goerr.NewTypedKey[int]("line")

	// Slack specific
	ChannelIDKey = goerr.NewTypedKey[string]("channel_id")
	MessageTSKey = goerr.NewTypedKey[string]("message_ts")
	SlackUserKey = goerr.NewTypedKey[string]("slack_user")
	ActionIDKey  = goerr.NewTypedKey[string]("action_id")
)
View Source
var (
	// Client errors (4xx)
	TagNotFound     = goerr.NewTag("not_found")    // 404
	TagValidation   = goerr.NewTag("validation")   // 400
	TagUnauthorized = goerr.NewTag("unauthorized") // 401
	TagForbidden    = goerr.NewTag("forbidden")    // 403
	TagConflict     = goerr.NewTag("conflict")     // 409
	TagRateLimit    = goerr.NewTag("rate_limit")   // 429

	// Server errors (5xx)
	TagInternal = goerr.NewTag("internal") // 500
	TagExternal = goerr.NewTag("external") // 502/503
	TagTimeout  = goerr.NewTag("timeout")  // 504
	TagDatabase = goerr.NewTag("database") // 500 (specific to DB errors)

	// Business logic errors
	TagInvalidState      = goerr.NewTag("invalid_state")
	TagDuplicateResource = goerr.NewTag("duplicate_resource")
	TagQuotaExceeded     = goerr.NewTag("quota_exceeded")
	TagResourceLocked    = goerr.NewTag("resource_locked")

	// External service errors
	TagSlackError  = goerr.NewTag("slack_error")
	TagGitHubError = goerr.NewTag("github_error")
	TagLLMError    = goerr.NewTag("llm_error")

	// Keep existing tags for compatibility
	TagInvalidLLMResponse = goerr.NewTag("invalid_llm_response")
	TagInvalidRequest     = goerr.NewTag("invalid_request")
	TagTestFailed         = goerr.NewTag("test_failed")
)
View Source
var ErrActionUnavailable = errors.New("action is not available")
View Source
var ErrKnowledgeQuotaExceeded = errors.New("knowledge quota exceeded")

Functions

func Handle

func Handle(ctx context.Context, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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