Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: http code (#3445)

p0ny3897821a4f64
diff --git a/server/setting.go b/server/setting.go
index e7a707a3aa..518bf8626c 100644
--- a/server/setting.go
+++ b/server/setting.go
@@ -83,7 +83,7 @@ func (s *Server) registerSettingRoutes(g *echo.Group) {
AppSecret: value.AppSecret,
}, "")
if err != nil {
- return echo.NewHTTPError(http.StatusInternalServerError, "Failed to create approval definition").SetInternal(err)
+ return echo.NewHTTPError(http.StatusBadRequest, "Failed to create approval definition").SetInternal(err)
}
value.ExternalApproval.ApprovalDefinitionID = approvalDefinitionID
b, err := json.Marshal(value)