MCPcopy
hub / github.com/pocketbase/pocketbase / serializeLogError

Function serializeLogError

tools/logger/batch_handler.go:312–325  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

310}
311
312func serializeLogError(err error) any {
313 if err == nil {
314 return nil
315 }
316
317 // prioritize a json structured format (e.g. validation.Errors)
318 jsonErr, ok := err.(json.Marshaler)
319 if ok {
320 return jsonErr
321 }
322
323 // fallback to its original string representation
324 return err.Error()
325}

Callers 1

normalizeLogAttrValueFunction · 0.85

Calls 1

ErrorMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…