Remove usages of AppError on filesstore service (#15841)

* Remove usages of AppError on filesstore service

* Fixing a golint error

* Fixing shadowed variable

* Adding err.Error() to the NewAppError calls

* Fixing tests

* Adding missed translations

* Fix error handling and updating the translation that affects it

* Fixing two typos
Этот коммит содержится в:
Jesús Espino
2020-12-20 12:53:07 +01:00
коммит произвёл GitHub
родитель 10be00f005
Коммит 7419898449
13 изменённых файлов: 366 добавлений и 289 удалений

Просмотреть файл

@@ -478,7 +478,7 @@ func TestS3TestConnection(t *testing.T) {
config.FileSettings.AmazonS3Bucket = model.NewString("Wrong_bucket")
_, resp = th.SystemAdminClient.TestS3Connection(&config)
CheckInternalErrorStatus(t, resp)
assert.Equal(t, "Unable to create bucket.", resp.Error.Message)
assert.Equal(t, "api.file.test_connection.app_error", resp.Error.Id)
*config.FileSettings.AmazonS3Bucket = "shouldcreatenewbucket"
_, resp = th.SystemAdminClient.TestS3Connection(&config)