probo icon indicating copy to clipboard operation
probo copied to clipboard

Issue: error while adding or altering document classifications

Open dgr-ednl opened this issue 1 year ago • 1 comments

When adding a document:

{"time":"2025-10-23T10:26:53.055965204+02:00","level":"ERROR","msg":"resolver panic","version":"0.76.0","environment":"prod","http_server_addr":"0.0.0.0:8080","http_request_method":"POST","http_request_host":"localhost:8080","http_request_path":"/api/console/v1/query","http_request_flavor":"HTTP/1.1","http_request_user_agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36","http_request_client_ip":"127.0.0.1:39968","http_request_id":"019a102d-90f9-7000-aad3-37b6ddd9f5e4","error":"cannot create document: cannot insert document: ERROR: invalid input value for enum document_classification: "" (SQLSTATE 22P02)","stack":"goroutine 921 [running]:\nruntime/debug.Stack()\n\t/usr/local/go/src/runtime/debug/stack.go:26 +0x5e\ngithub.com/getprobo/probo/pkg/server/graphql.RecoverFunc({0x3262f40?, 0xc000bc4690?}, {0x1ffe8e0, 0xc000a764c0})\n\t/opt/probo/pkg/server/graphql/recovery.go:28 +0xe5\ngithub.com/99designs/gqlgen/graphql.(*OperationContext).Recover(0x445420?, {0x3262f40, 0xc000bc4690}, {0x1ffe8e0?, 0xc000a764c0?})\n\t/root/go/pkg/mod/github.com/99designs/[email protected]/graphql/context_operation.go:125 +0x38\ngithub.com/getprobo/probo/pkg/server/api/console/v1/schema.(*executionContext)._Mutation_createDocument.func1()\n\t/opt/probo/pkg/server/api/console/v1/schema/schema.go:43090 +0x6e\npanic({0x1ffe8e0?, 0xc000a764c0?})\n\t/usr/local/go/src/runtime/panic.go:783 +0x132\ngithub.com/getprobo/probo/pkg/server/api/console/v1.(*mutationResolver).CreateDocument(0xc000ad1858?, {0x3262f40, 0xc000bc4690}, {{0xd9, 0xb1, 0x41, 0xf2, 0x4, 0xab, 0x0, ...}, ...})\n\t/opt/probo/pkg/server/api/console/v1/v1_resolver.go:2554 +0x285\ngithub.com/getprobo/probo/pkg/server/api/console/v1/schema.(*executionContext)._Mutation_createDocument.func2({0x3262f40, 0xc000bc4690})\n\t/opt/probo/pkg/server/api/console/v1/schema/schema.go:43096 +0x171\ngithub.com/99designs/gqlgen/graphql/executor.processExtensions.func4({0x3262f40?, 0xc000bc4690?}, 0xc000ad1910?)\n\t/root/go/pkg/mod/github.com/99designs/[email protected]/graphql/executor/extensions.go:73 +0x22\ngithub.com/99designs/gqlgen/graphql/executor.processExtensions.func8.1({0x3262f40?, 0xc000bc4690?})\n\t/root/go/pkg/mod/github.com/99designs/[email protected]/graphql/executor/extensions.go:111 +0x25\ngithub.com/getprobo/probo/pkg/server/graphql.TracingExtension.InterceptField({0x14f1b8c?}, {0x3262f40, 0xc000bc4690}, 0xc000a41e60)\n\t/opt/probo/pkg/server/graphql/tracing.go:70 +0x688\ngithub.com/99designs/gqlgen/graphql/executor.processExtensions.func8({0x3262f40, 0xc000bc4690}, 0xc000a76140)\n\t/root/go/pkg/mod/github.com/99designs/[email protected]/graphql/executor/extensions.go:110 +0xa2\ngithub.com/getprobo/probo/pkg/server/api/console/v1/schema.(*executionContext)._Mutation_createDocument(0xc00089bf20, {0x3262f40, 0xc000bc4480}, {0xc000acb8c0, {0xc000a85cf0, 0x1, 0x1}, 0x0})\n\t/opt/probo/pkg/server/api/console/v1/schema/schema.go:43094 +0x1fe\ngithub.com/getprobo/probo/pkg/server/api/console/v1/schema.(*executionContext)._Mutation.func76({0x3262f40?, 0xc000bc4480?})\n\t/opt/probo/pkg/server/api/console/v1/schema/schema.go:83879 +0x3e\ngithub.com/99designs/gqlgen/graphql/executor.processExtensions.func3({0x3262f40?, 0xc000bc4480?}, 0x1f100e0?)\n\t/root/go/pkg/mod/github.com/99designs/[email protected]/graphql/executor/extensions.go:70 +0x22\ngithub.com/getprobo/probo/pkg/server/api/console/v1/schema.(*executionContext)._Mutation(0xc00089bf20, {0x3262f40, 0xc000bc43f0}, {0xc000a84bd0, 0x1, 0x1})\n\t/opt/probo/pkg/server/api/console/v1/schema/schema.go:83878 +0x3b09\ngithub.com/getprobo/probo/pkg/server/api/console/v1/schema.(*executableSchema).Exec.func2({0x3262f40?, 0xc000bc43c0?})\n\t/opt/probo/pkg/server/api/console/v1/schema/schema.go:9012 +0x8a\ngithub.com/99designs/gqlgen/graphql/executor.(*Executor).DispatchOperation.func1.1.1({0x3262f40, 0xc000bc43c0})\n\t/root/go/pkg/mod/github.com/99designs/[email protected]/graphql/executor/executor.go:127 +0x25\ngithub.com/99designs/gqlgen/graphql/executor.processExtensions.func2({0x3262f40?, 0xc000bc43c0?}, 0x1f100e0?)\n\t/root/go/pkg/mod/github.com/99designs/[email protected]/graphql/executor/extensions.go:67 +0x22\ngithub.com/99designs/gqlgen/graphql/executor.(*Executor).DispatchOperation.func1.1({0x3262f40, 0xc000bc4300})\n\t/root/go/pkg/mod/github.com/99designs/[email protected]/graphql/executor/executor.go:126 +0x104\ngithub.com/getprobo/probo/pkg/server/graphql.TracingExtension.InterceptOperation.func1({0x3262f40, 0xc000bc4300})\n\t/opt/probo/pkg/server/graphql/tracing.go:99 +0x75\ngithub.com/99designs/gqlgen/graphql/handler/transport.POST.Do({0x0?, 0x20?}, {0x7f0c2c77b728, 0xc0009cde40}, 0xc000ae6f00, {0x3262180, 0xc000808e70})\n\t/root/go/pkg/mod/github.com/99designs/[email protected]/graphql/handler/transport/http_post.go:124 +0xaa2\ngithub.com/99designs/gqlgen/graphql/handler.(*Server).ServeHTTP(0xc00089b060, {0x7f0c2c77b728, 0xc0009cde40}, 0xc000ae6f00)\n\t/root/go/pkg/mod/github.com/99designs/[email protected]/graphql/handler/server.go:147 +0x225\ngithub.com/getprobo/probo/pkg/server/api/console/v1.graphqlHandler.WithSession.func2({0x7f0c2c77b728, 0xc0009cde40}, 0xc0009c9a40)\n\t/opt/probo/pkg/server/api/console/v1/resolver.go:362 +0x23d\nnet/http.HandlerFunc.ServeHTTP(0xc0009ba4b0?, {0x7f0c2c77b728?, 0xc0009cde40?}, 0xc0006ebb98?)\n\t/usr/local/go/src/net/http/server.go:2322 +0x29\ngithub.com/go-chi/chi/v5.(*Mux).routeHTTP(0xc000a0f620, {0x7f0c2c77b728, 0xc0009cde40}, 0xc0009c9a40)\n\t/root/go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:478 +0x2e2\nnet/http.HandlerFunc.ServeHTTP(0xc000ad2e48?, {0x7f0c2c77b728?, 0xc0009cde40?}, 0xc000ad2e28?)\n\t/usr/local/go/src/net/http/server.go:2322 +0x29\ngithub.com/go-chi/chi/v5.(*Mux).ServeHTTP(0xc000a0f620, {0x7f0c2c77b728, 0xc0009cde40}, 0xc0009c9a40)\n\t/root/go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:73 +0x32f\ngithub.com/go-chi/chi/v5.(*Mux).Mount.func1({0x7f0c2c77b728, 0xc0009cde40}, 0xc0009c9a40)\n\t/root/go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:325 +0x1bb\nnet/http.HandlerFunc.ServeHTTP(0xc0009ba4b0?, {0x7f0c2c77b728?, 0xc0009cde40?}, 0xc000045b60?)\n\t/usr/local/go/src/net/http/server.go:2322 +0x29\ngithub.com/go-chi/chi/v5.(*Mux).routeHTTP(0xc000a0f560, {0x7f0c2c77b728, 0xc0009cde40}, 0xc0009c9a40)\n\t/root/go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:478 +0x2e2\nnet/http.HandlerFunc.ServeHTTP(0xc0009bcbe0?, {0x7f0c2c77b728?, 0xc0009cde40?}, 0xc0009c9a40?)\n\t/usr/local/go/src/net/http/server.go:2322 +0x29\ngithub.com/go-chi/cors.(*Cors).Handler-fm.(*Cors).Handler.func1({0x7f0c2c77b728, 0xc0009cde40}, 0xc0009c9a40)\n\t/root/go/pkg/mod/github.com/go-chi/[email protected]/cors.go:231 +0x1a4\nnet/http.HandlerFunc.ServeHTTP(0x12?, {0x7f0c2c77b728?, 0xc0009cde40?}, 0xa?)\n\t/usr/local/go/src/net/http/server.go:2322 +0x29\ngithub.com/go-chi/chi/v5.(*Mux).ServeHTTP(0xc000a0f560, {0x7f0c2c77b728, 0xc0009cde40}, 0xc0009c9a40)\n\t/root/go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:73 +0x32f\ngithub.com/getprobo/probo/pkg/server/api.(*Server).ServeHTTP(0xc0003a0240, {0x7f0c2c77b728, 0xc0009cde40}, 0xc0009c9a40)\n\t/opt/probo/pkg/server/api/api.go:203 +0xa12\ngithub.com/go-chi/chi/v5.(*Mux).Mount.func1({0x7f0c2c77b728, 0xc0009cde40}, 0xc0009c9a40)\n\t/root/go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:325 +0x1bb\nnet/http.HandlerFunc.ServeHTTP(0xc0009ba4b0?, {0x7f0c2c77b728?, 0xc0009cde40?}, 0xc0004c5625?)\n\t/usr/local/go/src/net/http/server.go:2322 +0x29\ngithub.com/go-chi/chi/v5.(*Mux).routeHTTP(0xc000348600, {0x7f0c2c77b728, 0xc0009cde40}, 0xc0009c9a40)\n\t/root/go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:478 +0x2e2\nnet/http.HandlerFunc.ServeHTTP(0x205ef00?, {0x7f0c2c77b728?, 0xc0009cde40?}, 0x0?)\n\t/usr/local/go/src/net/http/server.go:2322 +0x29\ngithub.com/go-chi/chi/v5.(*Mux).ServeHTTP(0xc000348600, {0x7f0c2c77b728, 0xc0009cde40}, 0xc0009c9a40)\n\t/root/go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:73 +0x32f\ngithub.com/getprobo/probo/pkg/server.(*Server).ServeHTTP(0xc0002f64c0, {0x7f0c2c77b728, 0xc0009cde40}, 0xc0009c9a40)\n\t/opt/probo/pkg/server/server.go:126 +0x45\ngo.gearno.de/kit/httpserver.(*handlerWrapper).ServeHTTP(0xc000328cd0, {0x325d770, 0xc0009ba3c0}, 0xc0009c97c0)\n\t/root/go/pkg/mod/go.gearno.de/[email protected]/httpserver/handler_wrapper.go:337 +0x2064\nnet/http.serverHandler.ServeHTTP({0x324ee60?}, {0x325d770?, 0xc0009ba3c0?}, 0x6?)\n\t/usr/local/go/src/net/http/server.go:3340 +0x8e\nnet/http.(*conn).serve(0xc0009bf7a0, {0x3262f40, 0xc0007f4de0})\n\t/usr/local/go/src/net/http/server.go:2109 +0x665\ncreated by net/http.(*Server).Serve in goroutine 73\n\t/usr/local/go/src/net/http/server.go:3493 +0x485\n","name":"probod.http.server"}

When editing a document's classification I get a success notification but the classification is not saved.

dgr-ednl avatar Oct 23 '25 08:10 dgr-ednl

Released under v0.77.0

gearnode avatar Oct 23 '25 12:10 gearnode