[MM-57070] Remove detailed_error from errors when not in dev mode (#26414)
* remove detailed error from appErr.ToJSON * Revert "remove detailed error from appErr.ToJSON" This reverts commit 3c2fa7352d7a3bc7216b8e073179161779169d4b. * use WipeDetailed instead of err.DetailedError = "" * fix tests --------- Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
9e6c06186b
Коммит
6ea363e260
@@ -336,6 +336,11 @@ func (er *AppError) Wrap(err error) *AppError {
|
||||
return er
|
||||
}
|
||||
|
||||
func (er *AppError) WipeDetailed() {
|
||||
er.wrapped = nil
|
||||
er.DetailedError = ""
|
||||
}
|
||||
|
||||
// AppErrorFromJSON will try to decode the input into an AppError.
|
||||
func AppErrorFromJSON(r io.Reader) error {
|
||||
data, err := io.ReadAll(r)
|
||||
|
||||
Ссылка в новой задаче
Block a user