{"modulePath":"github.com/github/gh-skyline","version":"v0.1.9","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package errors\n\nPackage errors provides custom error types and utilities for the Skyline application.\n\n## Functions\n\n```go\nfunc Wrap(err error, message string) error\n```\nWrap enhances an existing error with additional context while preserving its type If the original error is nil, returns nil\n\n## Types\n\n```go\ntype ErrorType string\n```\nErrorType represents categories of errors that can occur in the application\n\n```go\nconst (\n\tValidationError ErrorType = \"VALIDATION\" // Input validation errors\n\tIOError         ErrorType = \"IO\"         // File/network I/O errors\n\tNetworkError    ErrorType = \"NETWORK\"    // Network communication errors\n\tGraphQLError    ErrorType = \"GRAPHQL\"    // GitHub GraphQL API errors\n\tSTLError        ErrorType = \"STL\"        // STL file generation errors\n\tGeneralError    ErrorType = \"GENERAL\"    // General errors not fitting other categories\n)\n```\nPredefined error types for consistent error categorization\n\n```go\ntype SkylineError struct {\n\tType    ErrorType // Category of the error\n\tMessage string    // Human-readable error description\n\tErr     error     // Original error if wrapping another error\n}\n```\nSkylineError provides structured error information including type and context\n\n```go\nfunc New(errType ErrorType, message string, err error) *SkylineError\n```\nNew creates a new SkylineError with the specified type, message, and wrapped error\n\n```go\nfunc (e *SkylineError) Error() string\n```\nError implements the error interface for SkylineError\n\n```go\nfunc (e *SkylineError) Is(target error) bool\n```\nIs implements error matching for SkylineError\n\n```go\nfunc (e *SkylineError) Unwrap() error\n```\nUnwrap implements error unwrapping for SkylineError\n\n","path":"github.com/github/gh-skyline/internal/errors","name":"errors","synopsis":"Package errors provides custom error types and utilities for the Skyline application.","isRedistributable":true}
