diff --git a/MVMCore/MVMCore/ActionHandling/MVMCoreActionHandler.swift b/MVMCore/MVMCore/ActionHandling/MVMCoreActionHandler.swift index c37d7a4..0e751a7 100644 --- a/MVMCore/MVMCore/ActionHandling/MVMCoreActionHandler.swift +++ b/MVMCore/MVMCore/ActionHandling/MVMCoreActionHandler.swift @@ -114,6 +114,7 @@ public protocol MVMCoreJSONActionHandlerProtocol: MVMCoreActionHandlerProtocol { throw ActionError.unknownAction(type: model.actionType) } } catch { + MVMCoreLoggingHandler.shared()?.logCoreEvent(.actionFailed(name: model.actionType, pageType: pageType(from: delegateObject), uuid: uuid, error: error)) MVMCoreActionHandler.log(string: "Failed Action \(error)", additionalData: additionalData) throw error } diff --git a/MVMCore/MVMCore/OtherHandlers/MVMCoreEvent.swift b/MVMCore/MVMCore/OtherHandlers/MVMCoreEvent.swift index 0753ff7..73d8ecc 100644 --- a/MVMCore/MVMCore/OtherHandlers/MVMCoreEvent.swift +++ b/MVMCore/MVMCore/OtherHandlers/MVMCoreEvent.swift @@ -40,7 +40,8 @@ public enum MVMCoreEvent { case actionFailed( name: String, pageType: String, - uuid: String + uuid: String, + error: Error? ) /// The action is completed.