Fix: Fix status assign to 500 (#1984)

* fix: remove assign to 500

* fix: reset on the incorrect case
This commit is contained in:
Matt Kaye
2025-07-14 13:12:07 -04:00
committed by GitHub
parent a60b74f897
commit 7c4685d48d
+1 -1
View File
@@ -441,7 +441,7 @@ func (t *APIServer) registerSpec(g *echo.Group, spec *openapi3.T) (*populator.Po
// note that the status code is not set yet as it gets picked up by the global err handler
// see here: https://github.com/labstack/echo/issues/2310#issuecomment-1288196898
if v.Error != nil {
if v.Error != nil && statusCode == 200 {
statusCode = 500
}