Hello,
I’m trying to import incoming mail from microsoft graph api.
Basically, power automate sends POST http request to corteza when new email arrives in a specific mailbox. Typical structure for json produced can be found here: Get message - Microsoft Graph v1.0 | Microsoft Learn
Somehow, there seem to be a maximal number of character that is accepted by corteza.
Before that threshold everything works fine. Above:
{
"error": {
"message": "sink request process error",
"meta": {
"resource": "system:sink",
"type": "processingError"
},
"stack": [
{
"func": "service.(*sink).ProcessRequest.func1",
"file": "/home/runner/work/corteza/corteza/server/system/service/sink.go",
"line": 167
},
{
"func": "service.(*sink).ProcessRequest",
"file": "/home/runner/work/corteza/corteza/server/system/service/sink.go",
"line": 171
},
{
"func": "rest.(*Sink).ServeHTTP",
"file": "/home/runner/work/corteza/corteza/server/system/rest/sink.go",
"line": 20
},
{
"func": "v5.(*ChainHandler).ServeHTTP",
"file": "/home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.7/chain.go",
"line": 31
},
{
"func": "v5.(*Mux).routeHTTP",
"file": "/home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.7/mux.go",
"line": 442
}
],
"wrap": {
"message": "failed to create sink event from request",
"meta": {
"resource": "system:sink",
"type": "failedToCreateEvent"
},
"stack": [
{
"func": "service.(*sink).process",
"file": "/home/runner/work/corteza/corteza/server/system/service/sink.go",
"line": 346
},
{
"func": "service.(*sink).ProcessRequest.func1",
"file": "/home/runner/work/corteza/corteza/server/system/service/sink.go",
"line": 166
},
{
"func": "service.(*sink).ProcessRequest",
"file": "/home/runner/work/corteza/corteza/server/system/service/sink.go",
"line": 171
},
{
"func": "rest.(*Sink).ServeHTTP",
"file": "/home/runner/work/corteza/corteza/server/system/rest/sink.go",
"line": 20
},
{
"func": "v5.(*ChainHandler).ServeHTTP",
"file": "/home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.7/chain.go",
"line": 31
},
{
"func": "v5.(*Mux).routeHTTP",
"file": "/home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.7/mux.go",
"line": 442
},
{
"func": "http.HandlerFunc.ServeHTTP",
"file": "/opt/hostedtoolcache/go/1.18.9/x64/src/net/http/server.go",
"line": 2084
},
{
"func": "v5.(*Mux).ServeHTTP",
"file": "/home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.7/mux.go",
"line": 71
},
{
"func": "v5.(*Mux).Mount.func1",
"file": "/home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.7/mux.go",
"line": 314
},
{
"func": "http.HandlerFunc.ServeHTTP",
"file": "/opt/hostedtoolcache/go/1.18.9/x64/src/net/http/server.go",
"line": 2084
},
{
"func": "v5.(*Mux).routeHTTP",
"file": "/home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.7/mux.go",
"line": 442
},
{
"func": "http.HandlerFunc.ServeHTTP",
"file": "/opt/hostedtoolcache/go/1.18.9/x64/src/net/http/server.go",
"line": 2084
},
{
"func": "v5.(*Mux).ServeHTTP",
"file": "/home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.7/mux.go",
"line": 71
},
{
"func": "v5.(*Mux).Mount.func1",
"file": "/home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.7/mux.go",
"line": 314
},
{
"func": "http.HandlerFunc.ServeHTTP",
"file": "/opt/hostedtoolcache/go/1.18.9/x64/src/net/http/server.go",
"line": 2084
},
{
"func": "v5.(*Mux).routeHTTP",
"file": "/home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.7/mux.go",
"line": 442
},
{
"func": "http.HandlerFunc.ServeHTTP",
"file": "/opt/hostedtoolcache/go/1.18.9/x64/src/net/http/server.go",
"line": 2084
},
{
"func": "auth.verifier.func1.1",
"file": "/home/runner/work/corteza/corteza/server/pkg/auth/token_middleware.go",
"line": 42
},
{
"func": "http.HandlerFunc.ServeHTTP",
"file": "/opt/hostedtoolcache/go/1.18.9/x64/src/net/http/server.go",
"line": 2084
},
{
"func": "server.contextLogger.func1.1",
"file": "/home/runner/work/corteza/corteza/server/pkg/api/server/logger.go",
"line": 28
},
{
"func": "http.HandlerFunc.ServeHTTP",
"file": "/opt/hostedtoolcache/go/1.18.9/x64/src/net/http/server.go",
"line": 2084
},
{
"func": "api.DebugToContext.func1.1",
"file": "/home/runner/work/corteza/corteza/server/pkg/api/debug.go",
"line": 15
},
{
"func": "http.HandlerFunc.ServeHTTP",
"file": "/opt/hostedtoolcache/go/1.18.9/x64/src/net/http/server.go",
"line": 2084
},
{
"func": "middleware.RequestID.func1",
"file": "/home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.7/middleware/request_id.go",
"line": 76
},
{
"func": "http.HandlerFunc.ServeHTTP",
"file": "/opt/hostedtoolcache/go/1.18.9/x64/src/net/http/server.go",
"line": 2084
},
{
"func": "api.RemoteAddrToContext.func1",
"file": "/home/runner/work/corteza/corteza/server/pkg/api/ipaddr.go",
"line": 17
},
{
"func": "http.HandlerFunc.ServeHTTP",
"file": "/opt/hostedtoolcache/go/1.18.9/x64/src/net/http/server.go",
"line": 2084
},
{
"func": "middleware.RealIP.func1",
"file": "/home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.7/middleware/realip.go",
"line": 35
},
{
"func": "http.HandlerFunc.ServeHTTP",
"file": "/opt/hostedtoolcache/go/1.18.9/x64/src/net/http/server.go",
"line": 2084
},
{
"func": "locale.DetectLanguage.func1.1",
"file": "/home/runner/work/corteza/corteza/server/pkg/locale/http.go",
"line": 26
},
{
"func": "http.HandlerFunc.ServeHTTP",
"file": "/opt/hostedtoolcache/go/1.18.9/x64/src/net/http/server.go",
"line": 2084
},
{
"func": "cors.(*Cors).Handler.func1",
"file": "/home/runner/go/pkg/mod/github.com/go-chi/cors@v1.2.1/cors.go",
"line": 228
},
{
"func": "http.HandlerFunc.ServeHTTP",
"file": "/opt/hostedtoolcache/go/1.18.9/x64/src/net/http/server.go",
"line": 2084
},
{
"func": "http.(*Handler).handle.func1",
"file": "/home/runner/go/pkg/mod/github.com/getsentry/sentry-go@v0.13.0/http/sentryhttp.go",
"line": 103
},
{
"func": "http.HandlerFunc.ServeHTTP",
"file": "/opt/hostedtoolcache/go/1.18.9/x64/src/net/http/server.go",
"line": 2084
},
{
"func": "v5.(*Mux).ServeHTTP",
"file": "/home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.7/mux.go",
"line": 71
},
{
"func": "v5.(*Mux).Mount.func1",
"file": "/home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.7/mux.go",
"line": 314
},
{
"func": "http.HandlerFunc.ServeHTTP",
"file": "/opt/hostedtoolcache/go/1.18.9/x64/src/net/http/server.go",
"line": 2084
},
{
"func": "v5.(*Mux).routeHTTP",
"file": "/home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.7/mux.go",
"line": 442
},
{
"func": "http.HandlerFunc.ServeHTTP",
"file": "/opt/hostedtoolcache/go/1.18.9/x64/src/net/http/server.go",
"line": 2084
},
{
"func": "cors.(*Cors).Handler.func1",
"file": "/home/runner/go/pkg/mod/github.com/go-chi/cors@v1.2.1/cors.go",
"line": 228
},
{
"func": "http.HandlerFunc.ServeHTTP",
"file": "/opt/hostedtoolcache/go/1.18.9/x64/src/net/http/server.go",
"line": 2084
},
{
"func": "v5.(*Mux).ServeHTTP",
"file": "/home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.7/mux.go",
"line": 88
},
{
"func": "server.(*demux).ServeHTTP",
"file": "/home/runner/work/corteza/corteza/server/pkg/api/server/demux.go",
"line": 51
},
{
"func": "http.serverHandler.ServeHTTP",
"file": "/opt/hostedtoolcache/go/1.18.9/x64/src/net/http/server.go",
"line": 2916
},
{
"func": "http.(*conn).serve",
"file": "/opt/hostedtoolcache/go/1.18.9/x64/src/net/http/server.go",
"line": 1966
}
],
"wrap": {}
}
}
}
This can be reproduced with basic body content of POST request. No error on nginx proxy (the body part is < 50 kb and custom.conf with client_max_body_size 200M;), .
e.g.
{
"test": "fzefokzepfk fzoekfpoezkfz (repeated)"
}
Thank you for your support!