Skip to content

Commit d68f840

Browse files
committed
fix: restore auth collection skip in Zod validation
Reverted shouldSkipCollection to skip auth collections (users, _superusers). Confirmed via trace ID system that 'Invalid module' error on setup/complete originates from PocketBase internal auth module, not from Zod validation. Auth collection skip prevents Goja from crashing on hidden auth fields. Trace ID system verified working: - HTTP response: X-Trace-Id header + traceId in body - Docker log: [trace=xxx] setup/complete: CreateFirstAdmin failed: <full error> - One grep with trace ID locates the complete error chain
1 parent 6fec52a commit d68f840

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

vault/internal/validation/validation.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,9 @@ func recordValues(vm *goja.Runtime, record *core.Record) (*goja.Object, error) {
239239
}
240240

241241
func shouldSkipCollection(collection *core.Collection) bool {
242-
// Skip system collections and auth collections — auth records have
243-
// hidden fields (password hash, tokenKey) that Goja cannot serialize
244-
// and that Zod schemas do not cover.
242+
// Skip system collections and auth collections. Auth records have
243+
// hidden fields (password hash, tokenKey) and internal module
244+
// validation that is incompatible with Goja-based Zod validation.
245245
return collection.System || collection.IsAuth()
246246
}
247247

0 commit comments

Comments
 (0)