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.

22 lines
432 B

  1. package proxy
  2. import (
  3. "fmt"
  4. "github.com/pkg/errors"
  5. )
  6. //--------------------------------------------
  7. var errNoData = fmt.Errorf("No data returned for query")
  8. // IsNoDataErr checks whether an error is due to a query returning empty data
  9. func IsNoDataErr(err error) bool {
  10. return errors.Cause(err) == errNoData
  11. }
  12. func ErrNoData() error {
  13. return errors.WithStack(errNoData)
  14. }
  15. //--------------------------------------------