Index: /trunk/src/org/openstreetmap/josm/gui/io/AbstractUploadTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/io/AbstractUploadTask.java	(revision 16406)
+++ /trunk/src/org/openstreetmap/josm/gui/io/AbstractUploadTask.java	(revision 16407)
@@ -8,4 +8,5 @@
 import java.net.HttpURLConnection;
 import java.text.DateFormat;
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
@@ -264,5 +265,12 @@
         );
         if (ret == 0) {
-            DownloadReferrersAction.downloadReferrers(MainApplication.getLayerManager().getEditLayer(), Arrays.asList(conflict.a));
+            if (msg.contains("to delete")) {
+                DownloadReferrersAction.downloadReferrers(MainApplication.getLayerManager().getEditLayer(),
+                        Arrays.asList(conflict.a));
+            }
+            if (msg.contains("to upload") && !conflict.b.isEmpty()) {
+                MainApplication.worker.submit(new DownloadPrimitivesTask(
+                        MainApplication.getLayerManager().getEditLayer(), new ArrayList<>(conflict.b), false));
+            }
         }
     }
Index: /trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java	(revision 16406)
+++ /trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java	(revision 16407)
@@ -26,4 +26,5 @@
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
+import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
 import org.openstreetmap.josm.data.osm.Relation;
 import org.openstreetmap.josm.data.osm.Way;
@@ -135,10 +136,28 @@
             return Pair.create(n, refs);
         }
-        m = Pattern.compile(".*Way (\\d+) requires the nodes with id in " + ids + ".*").matcher(msg);
+        m = Pattern.compile(".*Way ([-]*\\d+) requires the nodes with id in " + ids + ".*").matcher(msg);
         // ... ", which either do not exist, or are not visible"
         if (m.matches()) {
-            OsmPrimitive n = new Way(Long.parseLong(m.group(1)));
+            OsmPrimitive n = OsmPrimitiveType.WAY.newInstance(Long.parseLong(m.group(1)), true);
             for (String s : m.group(2).split(",")) {
                 refs.add(new Node(Long.parseLong(s)));
+            }
+            return Pair.create(n, refs);
+        }
+        m = Pattern.compile(".*Relation ([-]*\\d+) requires the nodes with id in " + ids + ".*").matcher(msg);
+        // ... ", which either do not exist, or are not visible"
+        if (m.matches()) {
+            OsmPrimitive n = OsmPrimitiveType.RELATION.newInstance(Long.parseLong(m.group(1)), true);
+            for (String s : m.group(2).split(",")) {
+                refs.add(new Node(Long.parseLong(s)));
+            }
+            return Pair.create(n, refs);
+        }
+        m = Pattern.compile(".*Relation ([-]*\\d+) requires the ways with id in " + ids + ".*").matcher(msg);
+        // ... ", which either do not exist, or are not visible"
+        if (m.matches()) {
+            OsmPrimitive n = OsmPrimitiveType.RELATION.newInstance(Long.parseLong(m.group(1)), true);
+            for (String s : m.group(2).split(",")) {
+                refs.add(new Way(Long.parseLong(s)));
             }
             return Pair.create(n, refs);
@@ -158,18 +177,9 @@
         if (conflict != null) {
             OsmPrimitive firstRefs = conflict.b.iterator().next();
-            String objId = Long.toString(conflict.a.getId());
+            String objId = Long.toString(conflict.a.getUniqueId());
             Collection<Long> refIds = Utils.transform(conflict.b, OsmPrimitive::getId);
             String refIdsString = refIds.size() == 1 ? refIds.iterator().next().toString() : refIds.toString();
             if (conflict.a instanceof Node) {
-                if (firstRefs instanceof Node) {
-                    return "<html>" + trn(
-                            "<strong>Failed</strong> to delete <strong>node {0}</strong>."
-                            + " It is still referred to by node {1}.<br>"
-                            + "Please load the node, remove the reference to the node, and upload again.",
-                            "<strong>Failed</strong> to delete <strong>node {0}</strong>."
-                            + " It is still referred to by nodes {1}.<br>"
-                            + "Please load the nodes, remove the reference to the node, and upload again.",
-                            conflict.b.size(), objId, refIdsString) + "</html>";
-                } else if (firstRefs instanceof Way) {
+                if (firstRefs instanceof Way) {
                     return "<html>" + trn(
                             "<strong>Failed</strong> to delete <strong>node {0}</strong>."
@@ -194,22 +204,15 @@
             } else if (conflict.a instanceof Way) {
                 if (firstRefs instanceof Node) {
+                    // way p1 requires nodes
                     return "<html>" + trn(
-                            "<strong>Failed</strong> to delete <strong>way {0}</strong>."
-                            + " It is still referred to by node {1}.<br>"
-                            + "Please load the node, remove the reference to the way, and upload again.",
-                            "<strong>Failed</strong> to delete <strong>way {0}</strong>."
-                            + " It is still referred to by nodes {1}.<br>"
-                            + "Please load the nodes, remove the reference to the way, and upload again.",
-                            conflict.b.size(), objId, refIdsString) + "</html>";
-                } else if (firstRefs instanceof Way) {
-                    return "<html>" + trn(
-                            "<strong>Failed</strong> to delete <strong>way {0}</strong>."
-                            + " It is still referred to by way {1}.<br>"
-                            + "Please load the way, remove the reference to the way, and upload again.",
-                            "<strong>Failed</strong> to delete <strong>way {0}</strong>."
-                            + " It is still referred to by ways {1}.<br>"
-                            + "Please load the ways, remove the reference to the way, and upload again.",
+                            "<strong>Failed</strong> to upload <strong>way {0}</strong>."
+                            + " It refers to deleted node {1}.<br>"
+                            + "Please load the node, remove the reference in the way, and upload again.",
+                            "<strong>Failed</strong> to upload <strong>way {0}</strong>."
+                            + " It refers to deleted nodes {1}.<br>"
+                            + "Please load the nodes, remove the reference in the way, and upload again.",
                             conflict.b.size(), objId, refIdsString) + "</html>";
                 } else if (firstRefs instanceof Relation) {
+                    // way is used by relation
                     return "<html>" + trn(
                             "<strong>Failed</strong> to delete <strong>way {0}</strong>."
@@ -226,19 +229,19 @@
                 if (firstRefs instanceof Node) {
                     return "<html>" + trn(
-                            "<strong>Failed</strong> to delete <strong>relation {0}</strong>."
-                            + " It is still referred to by node {1}.<br>"
-                            + "Please load the node, remove the reference to the relation, and upload again.",
-                            "<strong>Failed</strong> to delete <strong>relation {0}</strong>."
-                            + " It is still referred to by nodes {1}.<br>"
-                            + "Please load the nodes, remove the reference to the relation, and upload again.",
+                            "<strong>Failed</strong> to upload <strong>relation {0}</strong>."
+                            + " it refers to deleted node {1}.<br>"
+                            + "Please load the node, remove the reference in the relation, and upload again.",
+                            "<strong>Failed</strong> to upload <strong>relation {0}</strong>."
+                            + " it refers to deleted nodes {1}.<br>"
+                            + "Please load the nodes, remove the reference in the relation, and upload again.",
                             conflict.b.size(), objId, refIdsString) + "</html>";
                 } else if (firstRefs instanceof Way) {
                     return "<html>" + trn(
-                            "<strong>Failed</strong> to delete <strong>relation {0}</strong>."
-                            + " It is still referred to by way {1}.<br>"
-                            + "Please load the way, remove the reference to the relation, and upload again.",
-                            "<strong>Failed</strong> to delete <strong>relation {0}</strong>."
-                            + " It is still referred to by ways {1}.<br>"
-                            + "Please load the ways, remove the reference to the relation, and upload again.",
+                            "<strong>Failed</strong> to upload <strong>relation {0}</strong>."
+                            + " It refers to deleted way {1}.<br>"
+                            + "Please load the way, remove the reference in the relation, and upload again.",
+                            "<strong>Failed</strong> to upload <strong>relation {0}</strong>."
+                            + " It refers to deleted ways {1}.<br>"
+                            + "Please load the ways, remove the reference in the relation, and upload again.",
                             conflict.b.size(), objId, refIdsString) + "</html>";
                 } else if (firstRefs instanceof Relation) {
Index: /trunk/test/unit/org/openstreetmap/josm/tools/ExceptionUtilTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/tools/ExceptionUtilTest.java	(revision 16406)
+++ /trunk/test/unit/org/openstreetmap/josm/tools/ExceptionUtilTest.java	(revision 16407)
@@ -436,6 +436,6 @@
                 ExceptionUtil.explainPreconditionFailed(new OsmApiException(code, "Way 1 is still used by relation 1", "")));
 
-        assertEquals("<html><strong>Failed</strong> to delete <strong>way 1</strong>. It is still referred to by nodes [1, 2].<br>"+
-                "Please load the nodes, remove the reference to the way, and upload again.</html>",
+        assertEquals("<html><strong>Failed</strong> to upload <strong>way 1</strong>. It refers to deleted nodes [1, 2].<br>"+
+                "Please load the nodes, remove the reference in the way, and upload again.</html>",
                 ExceptionUtil.explainPreconditionFailed(new OsmApiException(code, "Way 1 requires the nodes with id in 1,2", "")));
     }
