errors

package
v0.1.10-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2024 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 to specific handlers based on the HTTP status code.

Types

type GraphErrorInfo

type GraphErrorInfo struct {
	StatusCode     int
	ErrorCode      string
	ErrorMessage   string
	IsODataError   bool
	AdditionalData map[string]interface{}
}

GraphErrorInfo contains extracted information from a Graph API error

func GraphError

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

GraphError logs detailed information about errors returned by the Graph SDK and returns extracted error information for further processing

Jump to

Keyboard shortcuts

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