[MM-58020] Improve error message of NotFound errors in store (#26870)

* Improve error message of NotFound errors in store

* update mmctl tests
Этот коммит содержится в:
Ben Schumacher
2024-05-07 15:30:48 +02:00
коммит произвёл GitHub
родитель d6543b9bd5
Коммит 09c39cf3ec
4 изменённых файлов: 37 добавлений и 9 удалений

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

@@ -120,10 +120,10 @@ func (e *ErrNotFound) Wrap(err error) *ErrNotFound {
func (e *ErrNotFound) Error() string {
if e.wrapped != nil {
return fmt.Sprintf("resource: %s id: %s error: %s", e.resource, e.ID, e.wrapped)
return fmt.Sprintf("resource %q not found, id: %s, error: %s", e.resource, e.ID, e.wrapped)
}
return fmt.Sprintf("resource: %s id: %s", e.resource, e.ID)
return fmt.Sprintf("resource %q not found, id: %s", e.resource, e.ID)
}
// IsErrNotFound allows easy type assertion without adding store as a dependency.