mirror of
https://github.com/floci-io/floci.git
synced 2026-11-27 07:39:24 -05:00
fix(iot): return ConflictException for shadow version mismatch (#5814)
* fix(iot): return ConflictException for shadow version mismatch * fix(iot): match AWS shadow version conflict message * test(iot): expect modeled shadow conflict in Python SDK
This commit is contained in:
1 parent
e245dbbdd5
commit
eb84539a67
3 files changed
+40
-3
No files matched your search
@@ -865,7 +865,7 @@ public class IotService {
|
||||
ObjectNode document = existing == null ? objectMapper.createObjectNode() : (ObjectNode) readJson(existing.getDocument()).deepCopy();
|
||||
long currentVersion = existing == null ? 0 : existing.getVersion();
|
||||
if (request.hasNonNull("version") && request.path("version").asLong() != currentVersion) {
|
||||
throw new AwsException("VersionConflictException", "Shadow version does not match requested version", 409);
|
||||
throw new AwsException("ConflictException", "Version conflict", 409);
|
||||
}
|
||||
ObjectNode state = document.withObject("/state");
|
||||
JsonNode requestState = request.path("state");
|
||||
|
||||
Reference in new issue
Block a user