refactor: 自定义业务错误 (#33)

* refactor: 自定义业务错误

* refactor: 隐藏服务器错误与统一 panic 响应
This commit is contained in:
NepetaLemon
2025-12-26 08:47:00 +08:00
committed by GitHub
parent b31698b9f2
commit 8d7a497553
8 changed files with 158 additions and 11 deletions

View File

@@ -143,7 +143,7 @@ func TestErrorFrom(t *testing.T) {
wantHTTPCode: http.StatusInternalServerError,
wantBody: Response{
Code: http.StatusInternalServerError,
Message: "boom",
Message: infraerrors.UnknownMessage,
},
},
}