Changeset 18802 in josm for trunk/src/org


Ignore:
Timestamp:
2023-08-09T15:50:55+02:00 (11 months ago)
Author:
taylor.smock
Message:

Fix #23109, see #18982 (r16217): Use the error body from the exception if it is HTML

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/ExceptionDialogUtil.java

    r17333 r18802  
    331331     */
    332332    public static void explainGenericHttpException(OsmApiException e) {
    333         String body = e.getErrorBody();
    334         Object msg = null;
     333        final String body = e.getErrorBody();
     334        final String msg;
    335335        if (e.isHtml() && body != null && body.startsWith("<") && body.contains("<html>")) {
    336336            // use html string as is
     337            msg = body;
    337338        } else {
    338339            msg = ExceptionUtil.explainGeneric(e);
Note: See TracChangeset for help on using the changeset viewer.