[MM-57826] Make sure the original errors are wrapped when AppErrors are returned (#26771)
Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
423809e0d0
Коммит
8348acac49
@@ -48,7 +48,7 @@ func localAddLicense(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
file, err := fileData.Open()
|
||||
if err != nil {
|
||||
c.Err = model.NewAppError("addLicense", "api.license.add_license.open.app_error", nil, err.Error(), http.StatusBadRequest)
|
||||
c.Err = model.NewAppError("addLicense", "api.license.add_license.open.app_error", nil, "", http.StatusBadRequest).Wrap(err)
|
||||
return
|
||||
}
|
||||
defer file.Close()
|
||||
|
||||
Ссылка в новой задаче
Block a user