fix(bun): handle panic in PreloadRelation without returning

This commit is contained in:
2026-08-28 22:47:55 +02:00
parent a68cf83be6
commit 105a5e1b87
4 changed files with 57 additions and 55 deletions
+1 -4
View File
@@ -669,10 +669,7 @@ func (b *BunSelectQuery) PreloadRelation(relation string, apply ...func(common.S
b.query = b.query.Relation(relation, func(sq *bun.SelectQuery) *bun.SelectQuery {
defer func() {
if r := recover(); r != nil {
err := logger.HandlePanic("BunSelectQuery.PreloadRelation", r)
if err != nil {
return
}
_ = logger.HandlePanic("BunSelectQuery.PreloadRelation", r)
}
}()
if len(apply) == 0 {