Save information about the organization and user from ArcGIS

This commit is contained in:
Eli Ribble 2025-11-07 02:07:33 +00:00
parent 07d3b3ea76
commit a08cd87813
No known key found for this signature in database
20 changed files with 786 additions and 93 deletions

28
errors.go Normal file
View file

@ -0,0 +1,28 @@
package main
import (
"errors"
"log/slog"
"reflect"
)
func LogErrorTypeInfo(err error) {
if err == nil {
slog.Info("Error is nil")
return
}
// Log current error type
errType := reflect.TypeOf(err)
slog.Info("Error type info",
"type", errType.String(),
"pkgPath", errType.PkgPath(),
"error", err.Error())
// Recursively log wrapped errors
wrappedErr := errors.Unwrap(err)
if wrappedErr != nil {
slog.Info("Contains wrapped error")
LogErrorTypeInfo(wrappedErr)
}
}