zhoushuguang / beyond

Based on the go-zero framework of large-scale microservices practical project, see all say yes!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

article/public 报错

Tristan-now opened this issue · comments

commented

{"@timestamp":"2024-04-05T10:54:53.334+08:00","caller":"internal/log.go:77","content":"(/v1/article/publish - [::1]:48618) runtime error: invalid memory address or nil pointer dereference\ngoroutine 88 [running]:\nruntime/debug.Stack()\n\t/usr/lib/go/src/runtime/debug/stack.go:24 +0x5e\ngithub.com/zeromicro/go-zero/rest/handler.RecoverHandler.func1.1()\n\t/home/zoedoet/go/pkg/mod/github.com/zeromicro/go-zero@v1.5.5/rest/handler/recoverhandler.go:16 +0x58\npanic({0x1a2a1e0?, 0x2e4ee30?})\n\t/usr/lib/go/src/runtime/panic.go:770 +0x132\nbeyond/application/article/api/internal/logic.(*PublishLogic).Publish(0xc00017ce40, 0xc0004a4bc0)\n\t/home/zoedoet/workspace/go/beyond/application/article/api/internal/logic/publishlogic.go:45 +0x10a\nbeyond/application/article/api/internal/handler.RegisterHandlers.PublishHandler.func2({0x1fa4278, 0xc00010f200}, 0xc0001cab40)\n\t/home/zoedoet/workspace/go/beyond/application/article/api/internal/handler/publishhandler.go:21 +0x8f\nnet/http.HandlerFunc.ServeHTTP(0x0?, {0x1fa4278?, 0xc00010f200?}, 0x0?)\n\t/usr/lib/go/src/net/http/server.go:2166 +0x29\ngithub.com/zeromicro/go-zero/rest/handler.GunzipHandler.func1({0x1fa4278, 0xc00010f200}, 0xc0001cab40)\n\t/home/zoedoet/go/pkg/mod/github.com/zeromicro/go-zero@v1.5.5/rest/handler/gunziphandler.go:26 +0xb1\nnet/http.HandlerFunc.ServeHTTP(0x7a2afa4971bfd5?, {0x1fa4278?, 0xc00010f200?}, 0xc17bf7df53efd215?)\n\t/usr/lib/go/src/net/http/server.go:2166 +0x29\ngithub.com/zeromicro/go-zero/rest.(*engine).buildChainWithNativeMiddlewares.MaxBytesHandler.func8.1({0x1fa4278?, 0xc00010f200?}, 0x2e8b420?)\n\t/home/zoedoet/go/pkg/mod/github.com/zeromicro/go-zero@v1.5.5/rest/handler/maxbyteshandler.go:24 +0xf8\nnet/http.HandlerFunc.ServeHTTP(0x0?, {0x1fa4278?, 0xc00010f200?}, 0x0?)\n\t/usr/lib/go/src/net/http/server.go:2166 +0x29\ngithub.com/zeromicro/go-zero/rest.(*engine).buildChainWithNativeMiddlewares.MetricHandler.func6.1({0x1fa4278, 0xc00010f200}, 0xc0001cab40)\n\t/home/zoedoet/go/pkg/mod/github.com/zeromicro/go-zero@v1.5.5/rest/handler/metrichandler.go:21 +0xae\nnet/http.HandlerFunc.ServeHTTP(0x0?, {0x1fa4278?, 0xc00010f200?}, 0x0?)\n\t/usr/lib/go/src/net/http/server.go:2166 +0x29\ngithub.com/zeromicro/go-zero/rest/handler.RecoverHandler.func1({0x1fa4278?, 0xc00010f200?}, 0x0?)\n\t/home/zoedoet/go/pkg/mod/github.com/zeromicro/go-zero@v1.5.5/rest/handler/recoverhandler.go:21 +0x78\nnet/http.HandlerFunc.ServeHTTP(0x0?, {0x1fa4278?, 0xc00010f200?}, 0x0?)\n\t/usr/lib/go/src/net/http/server.go:2166 +0x29\ngithub.com/zeromicro/go-zero/rest/handler.(*timeoutHandler).ServeHTTP.func1()\n\t/home/zoedoet/go/pkg/mod/github.com/zeromicro/go-zero@v1.5.5/rest/handler/timeouthandler.go:82 +0x71\ncreated by github.com/zeromicro/go-zero/rest/handler.(*timeoutHandler).ServeHTTP in goroutine 15\n\t/home/zoedoet/go/pkg/mod/github.com/zeromicro/go-zero@v1.5.5/rest/handler/timeouthandler.go:76 +0x319\n","level":"error","span":"c4442d8f3e35d519","trace":"5a53e69257ce72e80e9b8f1e48214afe"}
{"@timestamp":"2024-04-05T10:54:53.334+08:00","caller":"handler/loghandler.go:157","content":"[HTTP] 500 - POST /v1/article/publish - [::1]:48618 - PostmanRuntime/7.37.0\nPOST /v1/article/publish HTTP/1.1\r\nHost: localhost:8889\r\nAccept: /\r\nAccept-Encoding: gzip, deflate, br\r\nAuthorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MTI4ODY0NjUsImlhdCI6MTcxMjI4MTY2NSwidXNlcklkIjoyfQ.ol3awBLorwMqU7UQSz0kIO3pD3rFGgsWFCF7vjuxlrw\r\nConnection: keep-alive\r\nContent-Length: 718\r\nContent-Type: application/json\r\nPostman-Token: 045a2ba7-8d7b-4c65-a11f-fbb44d34fa16\r\nUser-Agent: PostmanRuntime/7.37.0\r\n\r\n{\n "title":"article_1",\n "content":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","duration":"0.2ms","level":"error","span":"c4442d8f3e35d519","trace":"5a53e69257ce72e80e9b8f1e48214afe"}