Documentation
      ¶
    
    
  
    
  
    Index ¶
- func GetRetryDelay(errorInfo *GraphErrorInfo, attempt int) time.Duration
 - func HandleKiotaGraphError(ctx context.Context, err error, resp any, operation string, ...)
 - func IsNonRetryableDeleteError(errorInfo *GraphErrorInfo) bool
 - func IsNonRetryableReadError(errorInfo *GraphErrorInfo) bool
 - func IsRetryableDeleteError(errorInfo *GraphErrorInfo) bool
 - func IsRetryableReadError(errorInfo *GraphErrorInfo) bool
 - type ErrorCategory
 - type ErrorDescription
 - type ErrorDetailInfo
 - type GraphErrorInfo
 - type InnerErrorInfo
 
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRetryDelay ¶
func GetRetryDelay(errorInfo *GraphErrorInfo, attempt int) time.Duration
GetRetryDelay calculates the appropriate retry delay based on error information
func HandleKiotaGraphError ¶
func HandleKiotaGraphError(ctx context.Context, err error, resp any, operation string, requiredPermissions []string)
HandleKiotaGraphError processes Graph API errors and dispatches them appropriately
func IsNonRetryableDeleteError ¶
func IsNonRetryableDeleteError(errorInfo *GraphErrorInfo) bool
IsNonRetryableDeleteError determines if an error should never be retried for delete operations based on the response http status code and error information
func IsNonRetryableReadError ¶
func IsNonRetryableReadError(errorInfo *GraphErrorInfo) bool
IsNonRetryableReadError determines if an error should never be retried for read operations based on the response http status code and error information
func IsRetryableDeleteError ¶
func IsRetryableDeleteError(errorInfo *GraphErrorInfo) bool
IsRetryableDeleteError determines if an error is retryable for delete operations based on the response http status code and error information
func IsRetryableReadError ¶
func IsRetryableReadError(errorInfo *GraphErrorInfo) bool
IsRetryableReadError determines if an error is retryable for read operations (especially after create/update) based on the response http status code and error information
Types ¶
type ErrorCategory ¶
type ErrorCategory string
ErrorCategory represents different types of errors
const ( CategoryAuthentication ErrorCategory = "authentication" CategoryAuthorization ErrorCategory = "authorization" CategoryValidation ErrorCategory = "validation" CategoryThrottling ErrorCategory = "throttling" CategoryService ErrorCategory = "service" CategoryNetwork ErrorCategory = "network" CategoryUnknown ErrorCategory = "unknown" )
type ErrorDescription ¶
ErrorDescription contains standardized error messages and summaries
type ErrorDetailInfo ¶
ErrorDetailInfo contains information from error details array
type GraphErrorInfo ¶
type GraphErrorInfo struct {
	StatusCode      int
	ErrorCode       string
	ErrorMessage    string
	Target          string
	IsODataError    bool
	AdditionalData  map[string]any
	Headers         *abstractions.ResponseHeaders
	RequestDetails  string
	RetryAfter      string
	RequestID       string
	ClientRequestID string
	ErrorDate       string
	InnerErrors     []InnerErrorInfo
	ErrorDetails    []ErrorDetailInfo
	CorrelationID   string
	ThrottledReason string
	Category        ErrorCategory
	DiagnosticInfo  string
}
    GraphErrorInfo contains extracted information from a Graph API error
func GraphError ¶
func GraphError(ctx context.Context, err error) GraphErrorInfo
GraphError extracts and analyzes error information from Graph API errors