Skip to content

Commit

Permalink
Avoid printing warnings for "Cache already exists"
Browse files Browse the repository at this point in the history
  • Loading branch information
vlsi committed Aug 19, 2020
1 parent 1c59269 commit 8ff7dd7
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,12 @@ suspend fun saveAndLog(
when (t.asDynamic().name) {
"ValidationError" -> throw t
"ReserveCacheError" -> info(t.message ?: "Unknown ReserveCacheError")
else -> warning("Error while uploading $key: ${t.message}")
else -> when {
t.message?.contains("Cache already exists") == true ->
info("Error while uploading $key: ${t.message}")
else ->
warning("Error while uploading $key: ${t.message}")
}
}
}
}

0 comments on commit 8ff7dd7

Please sign in to comment.