Skip to content
This repository was archived by the owner on Dec 20, 2023. It is now read-only.

Commit 7422693

Browse files
update error value for WeaveDataManagementClient
1 parent 9708816 commit 7422693

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/device-manager/WeaveDataManagementClient.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ WEAVE_ERROR GenericTraitUpdatableDataSink::GetBoolean(const char * apPath, bool
500500
SuccessOrExit(err);
501501

502502
it = mPathTlvDataMap.find(propertyPathHandle);
503-
VerifyOrExit(it != mPathTlvDataMap.end(), err = WEAVE_ERROR_INCORRECT_STATE);
503+
VerifyOrExit(it != mPathTlvDataMap.end(), err = WEAVE_ERROR_INVALID_TLV_TAG);
504504

505505
pMsgBuf = mPathTlvDataMap[propertyPathHandle];
506506

@@ -539,7 +539,7 @@ WEAVE_ERROR GenericTraitUpdatableDataSink::GetBytes(const char * apPath, BytesDa
539539
SuccessOrExit(err);
540540

541541
it = mPathTlvDataMap.find(propertyPathHandle);
542-
VerifyOrExit(it != mPathTlvDataMap.end(), err = WEAVE_ERROR_INCORRECT_STATE);
542+
VerifyOrExit(it != mPathTlvDataMap.end(), err = WEAVE_ERROR_INVALID_TLV_TAG);
543543

544544
pMsgBuf = mPathTlvDataMap[propertyPathHandle];
545545

@@ -572,7 +572,7 @@ WEAVE_ERROR GenericTraitUpdatableDataSink::GetTLVBytes(const char * apPath, Byte
572572
PacketBuffer * pMsgBuf = PacketBuffer::New();
573573
VerifyOrExit(NULL != pMsgBuf, err = WEAVE_ERROR_NO_MEMORY);
574574

575-
VerifyOrExit(NULL != apBytesData, err = WEAVE_ERROR_INCORRECT_STATE);
575+
VerifyOrExit(NULL != apBytesData, err = WEAVE_ERROR_INVALID_ARGUMENT);
576576

577577
err = GetSchemaEngine()->MapPathToHandle(apPath, propertyPathHandle);
578578
SuccessOrExit(err);
@@ -620,7 +620,7 @@ WEAVE_ERROR GenericTraitUpdatableDataSink::IsNull(const char * apPath, bool & aI
620620
SuccessOrExit(err);
621621

622622
it = mPathTlvDataMap.find(propertyPathHandle);
623-
VerifyOrExit(it != mPathTlvDataMap.end(), err = WEAVE_ERROR_INCORRECT_STATE);
623+
VerifyOrExit(it != mPathTlvDataMap.end(), err = WEAVE_ERROR_INVALID_TLV_TAG);
624624

625625
pMsgBuf = mPathTlvDataMap[propertyPathHandle];
626626

@@ -661,7 +661,7 @@ WEAVE_ERROR GenericTraitUpdatableDataSink::GetStringArray(const char * apPath, s
661661
SuccessOrExit(err);
662662

663663
it = mPathTlvDataMap.find(propertyPathHandle);
664-
VerifyOrExit(it != mPathTlvDataMap.end(), err = WEAVE_ERROR_INCORRECT_STATE);
664+
VerifyOrExit(it != mPathTlvDataMap.end(), err = WEAVE_ERROR_INVALID_TLV_TAG);
665665

666666
pMsgBuf = mPathTlvDataMap[propertyPathHandle];
667667

@@ -714,7 +714,7 @@ WEAVE_ERROR GenericTraitUpdatableDataSink::Get(const char * apPath, T & aValue)
714714
SuccessOrExit(err);
715715

716716
it = mPathTlvDataMap.find(propertyPathHandle);
717-
VerifyOrExit(it != mPathTlvDataMap.end(), err = WEAVE_ERROR_INCORRECT_STATE);
717+
VerifyOrExit(it != mPathTlvDataMap.end(), err = WEAVE_ERROR_INVALID_TLV_TAG);
718718

719719
pMsgBuf = mPathTlvDataMap[propertyPathHandle];
720720

@@ -779,7 +779,7 @@ GenericTraitUpdatableDataSink::GetLeafData(PropertyPathHandle aLeafHandle, uint6
779779

780780
std::map<PropertyPathHandle, PacketBuffer *>::iterator it = mPathTlvDataMap.find(aLeafHandle);
781781

782-
VerifyOrExit(it != mPathTlvDataMap.end(), err = WEAVE_ERROR_INCORRECT_STATE);
782+
VerifyOrExit(it != mPathTlvDataMap.end(), err = WEAVE_ERROR_INVALID_TLV_TAG);
783783

784784
pMsgBuf = mPathTlvDataMap[aLeafHandle];
785785

@@ -927,7 +927,7 @@ void WdmClient::ClientEventCallback(void * const aAppState, SubscriptionClient::
927927
else
928928
{
929929
traitListLen = pWdmClient->mSinkCatalog.Size();
930-
VerifyOrExit(traitListLen != 0, err = WEAVE_ERROR_INCORRECT_STATE);
930+
VerifyOrExit(traitListLen != 0, err = WEAVE_ERROR_INVALID_LIST_LENGTH);
931931
}
932932
WeaveLogDetail(DataManagement, "prepare to subscribe %d trait data sink", traitListLen);
933933

0 commit comments

Comments
 (0)