Files
ratatoskr-go/internal/storage/errors.go

21 lines
621 B
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package storage
import "errors"
// Классы ошибок Ratatoskr-стиля: S1S5
var (
// S1 — сущность не найдена
ErrNotFound = errors.New("S1: task not found")
// S2 — дубликат (task_tag, title+chat_id)
ErrDuplicate = errors.New("S2: duplicate entity")
// S3 — невалидный переход статуса
ErrInvalidStatus = errors.New("S3: invalid status transition")
// S4 — внутренняя ошибка БД
ErrDB = errors.New("S4: database error")
// S5 — трасса не найдена
ErrTraceNotFound = errors.New("S5: trace not found")
)