优化数据库初始化失败处理
Security Checks / security (push) Waiting to run

This commit is contained in:
xuans committed 2026-08-30 19:40:57 +08:00
1 parent 29cfebd620
commit 0b10489728
7 files changed
+175 -32

No files matched your search

+2 -1
View File
@@ -46,7 +46,8 @@ type sslResponse struct {
}
func writeSetupError(ctx *context.Context, w http.ResponseWriter, err error) {
log.WithContext(ctx).WithError(err).Error("setup request failed")
// 保留底层错误原因,便于定位数据库驱动、网络和权限问题;响应仍只返回安全的业务提示。
log.WithContext(ctx).WithError(err).Errorf("setup request failed: %v", err)
message := setup.DatabaseSetupErrorMessage(err)
if message == "" {
message = "\u521d\u59cb\u5316\u64cd\u4f5c\u5931\u8d25"