VOL-2293, VOL-2456 improve error handling

Change-Id: I4be5f12719a31b40363758cd47cc02968f180c75
diff --git a/adaptercore/statsmanager.go b/adaptercore/statsmanager.go
index 0905c1e..0ffa351 100755
--- a/adaptercore/statsmanager.go
+++ b/adaptercore/statsmanager.go
@@ -18,14 +18,12 @@
 package adaptercore
 
 import (
-	"errors"
 	"fmt"
-	"sync"
-	"time"
-
 	"github.com/opencord/voltha-lib-go/v3/pkg/log"
 	"github.com/opencord/voltha-protos/v3/go/openolt"
 	"github.com/opencord/voltha-protos/v3/go/voltha"
+	"sync"
+	"time"
 )
 
 var mutex = &sync.Mutex{}
@@ -235,7 +233,7 @@
 		return PONPorts, nil
 	} else {
 		log.Errorf("Invalid type of interface %s", Intftype)
-		return nil, errors.New("invalid type of interface ")
+		return nil, NewErrInvalidValue(log.Fields{"interface-type": Intftype}, nil)
 	}
 }