Documentation
¶
Index ¶
- func GetRetryDelay(errorInfo *GraphErrorInfo, attempt int) time.Duration
- func HandleGraphError(ctx context.Context, err error, resp interface{}, operation string, ...)
- func IsRetryableError(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 HandleGraphError ¶
func HandleGraphError(ctx context.Context, err error, resp interface{}, operation string, requiredPermissions []string)
HandleGraphError processes Graph API errors and dispatches them appropriately
func IsRetryableError ¶
func IsRetryableError(errorInfo *GraphErrorInfo) bool
IsRetryableError determines if an error is retryable based on 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]interface{}
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
Click to show internal directories.
Click to hide internal directories.