From a0a53f04776edc81451e2ca6e8354d6d6dc2f033 Mon Sep 17 00:00:00 2001 From: mr Date: Tue, 2 Jun 2026 14:04:33 +0200 Subject: [PATCH] Panic recovered FiltersFromFlatMap --- dbs/dbs.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dbs/dbs.go b/dbs/dbs.go index eb48e9d..bd6cd0d 100644 --- a/dbs/dbs.go +++ b/dbs/dbs.go @@ -161,6 +161,11 @@ type Filter struct { // Keys inside "and"/"or" are json tag names; the function resolves each to its // full dotted BSON path using the target struct. Unknown keys are kept as-is. func FiltersFromFlatMap(flatMap map[string]interface{}, target interface{}) *Filters { + defer func() { + if r := recover(); r != nil { + fmt.Printf("Panic recovered FiltersFromFlatMap: %v\n", r) + } + }() filters := &Filters{ And: make(map[string][]Filter), Or: make(map[string][]Filter),