Uploaded image for project: 'Magnolia REST Framework'
  1. Magnolia REST Framework
  2. MGNLREST-297

Improve logging of RestExceptionMapper

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Neutral
    • None
    • None
    • integration
    • None

    Description

      The info.magnolia.rest.RestExceptionMapper logs an error and the stacktrace (except for NotAcceptableException). The stacktrace seems to be abused for logging the source endpoint/method, and clutters the logs.

      Acceptance Criteria

      1. Decorated WebApplicationException exists which takes as arguments:
        1. The URI of the resource
        2. The HTTP Method
        3. The method's FQN
      2. Decorated WebApplicationException formats the log message containing the above arguments
      3. RestExceptionMapper logs an info (instead of an error)
      4. RestExceptionMapper logs exactly one line.

       

      Technical Details

      Logging an error in the server for a client error is not ideal. The client error represents an error to the client, hence the error response. To the server it should represent every day business though, hence an Info would be more appropriate.

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              Unassigned Unassigned
              tszczepanski Tobias Szczepanski
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Checklists

                  Task DoD