Uploaded image for project: 'JBoss Transaction Manager'
  1. JBoss Transaction Manager
  2. JBTM-3424

Make consistency in error messag printed in log and returned via WebApplicationException to client

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Minor
    • 5.12.1.Final
    • 5.10.6.Final
    • LRA
    • None

    Description

      The LRA code uses patter at many places where it prints error message to log and then it returns that error description to client by throwing the WebApplicationException.

      The example could be

      } catch (URISyntaxException e) {
        LRALogger.i18NLogger.error_invalidRecoveryUrlToJoinLRAURI(recoveryUrl.toString(), lraId);
        String errorMsg = lraId + ": Invalid recovery URL " + recoveryUrl.toString();
        throw new WebApplicationException(errorMsg, e ,                   Response.status(INTERNAL_SERVER_ERROR).entity(errorMsg).build());
      }
      

      There is the inconsistency that the log message is not the same as the message returned in via the exception.

      It would be good to make it consistent. The goal is to verify the log messages at `io.narayana.lra.proxy.logging.lraI18NLogger` and `io.narayana.lra.logging.lraI18NLogger`.

      Attachments

        Activity

          People

            mshikalw Moulali Shikalwadi
            ochaloup@redhat.com Ondrej Chaloupka (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: