VOL-2401 - turn error into warning
Change-Id: Ic7661bf6a9bda5d8468efe2124f7bcdc142be04a
diff --git a/rw_core/core/adapter_request_handler.go b/rw_core/core/adapter_request_handler.go
index dbdcc31..fd07c7e 100644
--- a/rw_core/core/adapter_request_handler.go
+++ b/rw_core/core/adapter_request_handler.go
@@ -778,10 +778,13 @@
}
go func() {
- err := rhp.deviceMgr.updatePortState(context.TODO(), deviceID.Id, voltha.Port_PortType(portType.Val), uint32(portNo.Val),
- voltha.OperStatus_Types(operStatus.Val))
- if err != nil {
- log.Errorw("unable-to-update-port-state", log.Fields{"error": err})
+ if err := rhp.deviceMgr.updatePortState(context.TODO(), deviceID.Id, voltha.Port_PortType(portType.Val), uint32(portNo.Val),
+ voltha.OperStatus_Types(operStatus.Val)); err != nil {
+ // If the error doesn't change behavior and is
+ // essentially ignored, it is not an error, it is a
+ // warning.
+ // TODO: VOL-2707
+ log.Warnw("unable-to-update-port-state", log.Fields{"error": err})
}
}()