Fix audit log to contain ending timestamp
[policy/engine.git] / ONAP-PDP-REST / src / main / java / org / onap / policy / pdp / rest / XACMLPdpRegisterThread.java
index 14b312f..49400d6 100644 (file)
@@ -248,8 +248,8 @@ public class XACMLPdpRegisterThread implements Runnable {
                                }
                        } catch (Exception e) {
                                LOGGER.error(XACMLErrorConstants.ERROR_SYSTEM_ERROR + e);
+                               loggingContext.transactionEnded();
                                PolicyLogger.audit("Transaction Failed - See Error.log");
-               loggingContext.transactionEnded();
                                papUrls.failed();
                        } finally {
                                // cleanup the connection