Migration of AuditStore to return plain errors (#14825)

Automatic Merge
Этот коммит содержится в:
Rodrigo Villablanca
2020-06-26 00:26:35 -04:00
коммит произвёл GitHub
родитель 98d72e51fe
Коммит 0118db9d23
12 изменённых файлов: 100 добавлений и 72 удалений

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

@@ -88,3 +88,17 @@ func NewErrNotFound(resource, id string) *ErrNotFound {
func (e *ErrNotFound) Error() string {
return "resource: " + e.resource + " id: " + e.Id
}
// ErrOutOfBounds indicates that the requested total numbers of rows
// was greater than the allowed limit.
type ErrOutOfBounds struct {
value int
}
func (e *ErrOutOfBounds) Error() string {
return fmt.Sprintf("invalid limit parameter: %d", e.value)
}
func NewErrOutOfBounds(value int) *ErrOutOfBounds {
return &ErrOutOfBounds{value: value}
}