Better handling of errors on trial license request (#14886)
* Fix behavior on blank site url on trial requests * Adding trial license error response handling * Changing text based on PR review comments
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
9e12a34e3c
Коммит
05dc928576
@@ -218,6 +218,10 @@ func (s *Server) RequestTrialLicense(trialRequest *model.TrialLicenseRequest) *m
|
||||
defer resp.Body.Close()
|
||||
licenseResponse := model.MapFromJson(resp.Body)
|
||||
|
||||
if _, ok := licenseResponse["license"]; !ok {
|
||||
return model.NewAppError("RequestTrialLicense", "api.license.request_trial_license.app_error", nil, licenseResponse["message"], http.StatusBadRequest)
|
||||
}
|
||||
|
||||
if _, err := s.SaveLicense([]byte(licenseResponse["license"])); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user