errors

package
v0.7.0-alpha Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2025 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleGraphError

func HandleGraphError(ctx context.Context, err error, resp interface{}, operation string, requiredPermissions []string)

HandleGraphError processes Graph API errors and dispatches them appropriately

Types

type ErrorDescription

type ErrorDescription struct {
	Summary string
	Detail  string
}

ErrorDescription contains standardized error messages and summaries

type GraphErrorInfo

type GraphErrorInfo struct {
	StatusCode     int
	ErrorCode      string
	ErrorMessage   string
	IsODataError   bool
	AdditionalData map[string]interface{}
	Headers        *abstractions.ResponseHeaders
	RequestDetails string
	RetryAfter     string
}

GraphErrorInfo contains extracted information from a Graph API error

func GraphError

func GraphError(ctx context.Context, err error) GraphErrorInfo

GraphError extracts and processes error information from Graph API errors

Jump to

Keyboard shortcuts

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