Index: trunk/src/org/openstreetmap/josm/gui/ExceptionDialogUtil.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/ExceptionDialogUtil.java	(revision 4018)
+++ trunk/src/org/openstreetmap/josm/gui/ExceptionDialogUtil.java	(revision 4020)
@@ -272,7 +272,8 @@
      */
     public static void explainAuthorizationFailed(OsmApiException e) {
-        HelpAwareOptionPane.showOptionDialog(
-                Main.parent,
-                ExceptionUtil.explainFailedOAuthAuthorisation(e),
+        // Fixme: add special handling that calls ExceptionUtil.explainFailedOAuthAuthorisation(e)
+        HelpAwareOptionPane.showOptionDialog(
+                Main.parent,
+                ExceptionUtil.explainFailedAuthorisation(e),
                 tr("Authorisation Failed"),
                 JOptionPane.ERROR_MESSAGE,
Index: trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java	(revision 4018)
+++ trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java	(revision 4020)
@@ -126,4 +126,28 @@
                 + "</html>",
                 OAuthAccessTokenHolder.getInstance().getAccessTokenKey()
+        );
+    }
+
+    public static String explainFailedAuthorisation(OsmApiException e) {
+        e.printStackTrace();
+        String header = e.getErrorHeader();
+        String body = e.getErrorBody();
+        String msg = null;
+        if (header != null) {
+            if (body != null && !header.equals(body)) {
+                msg = header + " (" + body + ")";
+            } else {
+                msg = header;
+            }
+        } else {
+            msg = body;
+        }
+        
+        return tr("<html>"
+                + "Authorisation at the OSM server failed.<br>"
+                + "The server reported the following error:<br>"
+                + "''{0}''"
+                + "</html>",
+                msg
         );
     }
