Commit 4bbb2b84 authored by Ricki Hirner's avatar Ricki Hirner

Ignore non-successful multiget responses

parent 8bdf03bf
Pipeline #38623182 passed with stages
in 12 minutes and 31 seconds
...@@ -131,6 +131,11 @@ class CalendarSyncManager( ...@@ -131,6 +131,11 @@ class CalendarSyncManager(
useRemoteCollection { useRemoteCollection {
it.multiget(bunch) { response, _ -> it.multiget(bunch) { response, _ ->
useRemote(response) { useRemote(response) {
if (!response.isSuccess()) {
Logger.log.warning("Received non-successful multiget response for ${response.href}")
return@useRemote
}
val eTag = response[GetETag::class.java]?.eTag val eTag = response[GetETag::class.java]?.eTag
?: throw DavException("Received multi-get response without ETag") ?: throw DavException("Received multi-get response without ETag")
......
...@@ -317,6 +317,11 @@ class ContactsSyncManager( ...@@ -317,6 +317,11 @@ class ContactsSyncManager(
useRemoteCollection { useRemoteCollection {
it.multiget(bunch, hasVCard4) { response, _ -> it.multiget(bunch, hasVCard4) { response, _ ->
useRemote(response) { useRemote(response) {
if (!response.isSuccess()) {
Logger.log.warning("Received non-successful multiget response for ${response.href}")
return@useRemote
}
val eTag = response[GetETag::class.java]?.eTag val eTag = response[GetETag::class.java]?.eTag
?: throw DavException("Received multi-get response without ETag") ?: throw DavException("Received multi-get response without ETag")
......
...@@ -112,6 +112,11 @@ class TasksSyncManager( ...@@ -112,6 +112,11 @@ class TasksSyncManager(
useRemoteCollection { useRemoteCollection {
it.multiget(bunch) { response, _ -> it.multiget(bunch) { response, _ ->
useRemote(response) { useRemote(response) {
if (!response.isSuccess()) {
Logger.log.warning("Received non-successful multiget response for ${response.href}")
return@useRemote
}
val eTag = response[GetETag::class.java]?.eTag val eTag = response[GetETag::class.java]?.eTag
?: throw DavException("Received multi-get response without ETag") ?: throw DavException("Received multi-get response without ETag")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment