From bfdf6638ee1b5d47ca7f164a63f78fa75a4b2a3f Mon Sep 17 00:00:00 2001 From: Agniva De Sarker Date: Thu, 12 Dec 2024 10:33:46 +0530 Subject: [PATCH] Adding error context in license validation (#29554) While investigating https://mattermost.atlassian.net/browse/MM-61529, I noticed that we weren't adding the internal error which made it impossible to understand what was really happening. ```release-note NONE ``` --- server/channels/api4/license.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/channels/api4/license.go b/server/channels/api4/license.go index 277994eeaa..3377f43017 100644 --- a/server/channels/api4/license.go +++ b/server/channels/api4/license.go @@ -117,7 +117,7 @@ func addLicense(c *Context, w http.ResponseWriter, r *http.Request) { canStartTrialLicense, err := lm.CanStartTrial() if err != nil { - c.Err = model.NewAppError("addLicense", "api.license.add_license.open.app_error", nil, "", http.StatusInternalServerError) + c.Err = model.NewAppError("addLicense", "api.license.add_license.open.app_error", nil, "", http.StatusInternalServerError).Wrap(err) return }