When the upstream returns any of the following codes: 500, 502, 503, I get a panic without any http response. Here is it:
2024-09-22T10:38:34Z ERR fmt/print.go:305 > plugins-storage/sources/gop-4038460229/src/github.com/darkweak/souin/plugins/traefik/vendor/github.com/darkweak/souin/pkg/middleware/middleware.go:260:12: panic: github.com/darkweak/souin/pkg/middleware.Upstream(...) module=github.com/darkweak/souin plugin=plugin-souin runtime=
2024-09-22T10:38:34Z ERR fmt/print.go:305 > plugins-storage/sources/gop-4038460229/src/github.com/darkweak/souin/plugins/traefik/vendor/github.com/darkweak/souin/pkg/middleware/middleware.go:543:19: panic: github.com/darkweak/souin/pkg/middleware.ServeHTTP.func(...) module=github.com/darkweak/souin plugin=plugin-souin runtime=
panic: reflect.Set: value of type *struct {} is not assignable to type error [recovered]
panic: reflect.Set: value of type *struct {} is not assignable to type error [recovered]
panic: reflect.Set: value of type *struct {} is not assignable to type error
goroutine 159 [running]:
github.com/traefik/yaegi/interp.runCfg.func1()
github.com/traefik/yaegi@v0.16.1/interp/run.go:226 +0x1ae
panic({0x49af8e0?, 0xc0037c14a0?})
runtime/panic.go:785 +0x132
github.com/traefik/yaegi/interp.runCfg.func1()
github.com/traefik/yaegi@v0.16.1/interp/run.go:226 +0x1ae
panic({0x49af8e0?, 0xc0037c14a0?})
runtime/panic.go:785 +0x132
reflect.Value.assignTo({0x48e5580?, 0xa1587c0?, 0xa1587c0?}, {0x5abe71d, 0xb}, 0x4e009a0, 0xc003823c90)
reflect/value.go:3358 +0x299
reflect.Value.Set({0x4e009a0?, 0xc003823c90?, 0x49afb20?}, {0x48e5580?, 0xa1587c0?, 0xc004a5c078?})
reflect/value.go:2313 +0xe6
github.com/traefik/yaegi/interp._new.func1(0xc004a7aa50)
github.com/traefik/yaegi@v0.16.1/interp/run.go:3418 +0xba
github.com/traefik/yaegi/interp.runCfg(0xc004e94780, 0xc004a7aa50, 0xc003823c80?, 0x49af8e0?)
github.com/traefik/yaegi@v0.16.1/interp/run.go:234 +0x265
github.com/traefik/yaegi/interp.genFunctionWrapper.func1.1({0xc003415e00, 0x5, 0x8?})
github.com/traefik/yaegi@v0.16.1/interp/run.go:1042 +0x7a5
reflect.Value.call({0xc002595880?, 0xc0023dc8d0?, 0x0?}, {0x5aa6ab6, 0x4}, {0xc003415d80, 0x5, 0xc0031154f0?})
reflect/value.go:581 +0xca6
reflect.Value.Call({0xc002595880?, 0xc0023dc8d0?, 0x47b089?}, {0xc003415d80?, 0xc0031154f0?, 0x4bf2360?})
reflect/value.go:365 +0xb9
github.com/traefik/yaegi/interp.call.func9.2({0xc003415d80?, 0xc0023dc8d0?, 0x0?})
github.com/traefik/yaegi@v0.16.1/interp/run.go:1310 +0x36
github.com/traefik/yaegi/interp.call.func9(0xc004a7a9a0)
github.com/traefik/yaegi@v0.16.1/interp/run.go:1330 +0xcc5
github.com/traefik/yaegi/interp.runCfg(0xc004f2ba40, 0xc004a7a9a0, 0xc0050bb260?, 0x0?)
github.com/traefik/yaegi@v0.16.1/interp/run.go:234 +0x265
github.com/traefik/yaegi/interp.getFunc.func1.1({0xa1587c0, 0x0, 0x0?})
github.com/traefik/yaegi@v0.16.1/interp/run.go:1919 +0x58d
reflect.Value.call({0x48e5c40?, 0xc0023dc7b0?, 0x13?}, {0x5aa6ab6, 0x4}, {0xa1587c0, 0x0, 0x0?})
reflect/value.go:581 +0xca6
reflect.Value.Call({0x48e5c40?, 0xc0023dc7b0?, 0xa?}, {0xa1587c0?, 0x7?, 0x0?})
reflect/value.go:365 +0xb9
github.com/traefik/yaegi/interp.call.func9.2({0xa1587c0?, 0x4598f61?, 0xe?})
github.com/traefik/yaegi@v0.16.1/interp/run.go:1310 +0x36
created by github.com/traefik/yaegi/interp.call.func9 in goroutine 147
github.com/traefik/yaegi@v0.16.1/interp/run.go:1322 +0xf4f
This configuration seems to work when the upstreams returns any other http status codes. And I also tried older versions of Souin and Traefik but that didn't change the issue.
Hi, using Souin
1.7.1
and Traefik3.1.4
with the following config:When the upstream returns any of the following codes:
500
,502
,503
, I get a panic without any http response. Here is it:This configuration seems to work when the upstreams returns any other http status codes. And I also tried older versions of Souin and Traefik but that didn't change the issue.