Uploaded image for project: 'Reference Application'
  1. Reference Application
  2. RA-974

Do not log an ERROR-level exception when a user's session has timed out

    XMLWordPrintable

    Details

    • Complexity:
      Undetermined

      Description

      See https://talk.openmrs.org/t/openmrs-apiauthenticationexception-on-simple-dry-run/3857

      If a non-authenticated user tries to access a page (either because they followed a bookmark, or because their session has timed out) we log an ERROR-level exception like this:

      ERROR - uncaughtException_jsp._jspService(425) |2015-12-03 23:25:23,165| Exception was thrown by not authenticated user
      org.openmrs.api.APIAuthenticationException
      	at org.openmrs.module.appui.UiSessionContext.requireAuthentication(UiSessionContext.java:121)
      ...
      

      This is a common non-error thing to happen.

      To Dos:

      • Don't log the full stack trace in this situation, but just a one-liner like "Unauthenticated user tried to access $page"
      • Log this at INFO level, instead of ERROR level.

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              dkayiwa Daniel Kayiwa
              Reporter:
              darius Darius Jazayeri
              Votes:
              3 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 hours
                  2h