Skip to content

Commit

Permalink
Change a few error status codes
Browse files Browse the repository at this point in the history
Use RESOURCE_EXHAUSTED in some cases.
  • Loading branch information
mlepage-google committed May 9, 2022
1 parent 3f991f0 commit 099bbf1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ CHIP_ERROR AccessControlAttribute::WriteAcl(const ConcreteDataAttributePath & aP
size_t newCount;
ReturnErrorOnFailure(list.ComputeSize(&newCount));

VerifyOrReturnError(newCount <= maxCount, CHIP_IM_GLOBAL_STATUS(ConstraintError));
VerifyOrReturnError(newCount <= maxCount, CHIP_IM_GLOBAL_STATUS(ResourceExhausted));

auto iterator = list.begin();
size_t i = 0;
Expand Down Expand Up @@ -234,7 +234,7 @@ CHIP_ERROR AccessControlAttribute::WriteAcl(const ConcreteDataAttributePath & aP
}
else if (aPath.mListOp == ConcreteDataAttributePath::ListOperation::AppendItem)
{
VerifyOrReturnError((oldCount + 1) <= maxCount, CHIP_IM_GLOBAL_STATUS(ConstraintError));
VerifyOrReturnError((oldCount + 1) <= maxCount, CHIP_IM_GLOBAL_STATUS(ResourceExhausted));

AclStorage::DecodableEntry decodableEntry;
ReturnErrorOnFailure(aDecoder.Decode(decodableEntry));
Expand Down
2 changes: 1 addition & 1 deletion src/app/tests/suites/TestAccessControlCluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ tests:
},
]
response:
error: 0x87
error: RESOURCE_EXHAUSTED

- label: "Verify"
command: "readAttribute"
Expand Down

0 comments on commit 099bbf1

Please sign in to comment.