SystemStore migration to return plain errors (#14835)
* SystemStore migration to return plain errors * Fix nilness * Fix translations * Fix merge * Fix layers * Fix merge errors * Lint: remove unnecessary use of sprint * Fix merge errors * Fix i18n Co-authored-by: Agniva De Sarker <agnivade@yahoo.co.in>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
e8d431ee7c
Коммит
20e44399c7
@@ -6332,7 +6332,7 @@ func (s *OpenTracingLayerStatusStore) UpdateLastActivityAt(userId string, lastAc
|
||||
return err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerSystemStore) Get() (model.StringMap, *model.AppError) {
|
||||
func (s *OpenTracingLayerSystemStore) Get() (model.StringMap, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "SystemStore.Get")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -6350,7 +6350,7 @@ func (s *OpenTracingLayerSystemStore) Get() (model.StringMap, *model.AppError) {
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerSystemStore) GetByName(name string) (*model.System, *model.AppError) {
|
||||
func (s *OpenTracingLayerSystemStore) GetByName(name string) (*model.System, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "SystemStore.GetByName")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -6368,7 +6368,7 @@ func (s *OpenTracingLayerSystemStore) GetByName(name string) (*model.System, *mo
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerSystemStore) InsertIfExists(system *model.System) (*model.System, *model.AppError) {
|
||||
func (s *OpenTracingLayerSystemStore) InsertIfExists(system *model.System) (*model.System, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "SystemStore.InsertIfExists")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -6386,7 +6386,7 @@ func (s *OpenTracingLayerSystemStore) InsertIfExists(system *model.System) (*mod
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerSystemStore) PermanentDeleteByName(name string) (*model.System, *model.AppError) {
|
||||
func (s *OpenTracingLayerSystemStore) PermanentDeleteByName(name string) (*model.System, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "SystemStore.PermanentDeleteByName")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -6404,7 +6404,7 @@ func (s *OpenTracingLayerSystemStore) PermanentDeleteByName(name string) (*model
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerSystemStore) Save(system *model.System) *model.AppError {
|
||||
func (s *OpenTracingLayerSystemStore) Save(system *model.System) error {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "SystemStore.Save")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -6422,7 +6422,7 @@ func (s *OpenTracingLayerSystemStore) Save(system *model.System) *model.AppError
|
||||
return err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerSystemStore) SaveOrUpdate(system *model.System) *model.AppError {
|
||||
func (s *OpenTracingLayerSystemStore) SaveOrUpdate(system *model.System) error {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "SystemStore.SaveOrUpdate")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -6440,7 +6440,7 @@ func (s *OpenTracingLayerSystemStore) SaveOrUpdate(system *model.System) *model.
|
||||
return err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerSystemStore) Update(system *model.System) *model.AppError {
|
||||
func (s *OpenTracingLayerSystemStore) Update(system *model.System) error {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "SystemStore.Update")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
|
||||
Ссылка в новой задаче
Block a user