You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

21 lines
384 B

package proxy
import (
"github.com/pkg/errors"
)
type errNoData struct{}
func (e errNoData) Error() string {
return "No data returned for query"
}
// IsErrNoData checks whether an error is due to a query returning empty data
func IsErrNoData(err error) bool {
_, ok := errors.Cause(err).(errNoData)
return ok
}
func ErrNoData() error {
return errors.Wrap(errNoData{}, "")
}