From cf3d7810d4ce9b7f57805cd0149b4e0367095811 Mon Sep 17 00:00:00 2001 From: "Phiroz, Danish" Date: Thu, 19 Sep 2024 12:30:48 +0000 Subject: [PATCH] MVAPCT-273 --- MVMCore/MVMCore/ActionHandling/MVMCoreActionHandler.swift | 2 +- MVMCore/MVMCore/Utility/ReadableDecodingErrors.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MVMCore/MVMCore/ActionHandling/MVMCoreActionHandler.swift b/MVMCore/MVMCore/ActionHandling/MVMCoreActionHandler.swift index 8d20194..0c4a80b 100644 --- a/MVMCore/MVMCore/ActionHandling/MVMCoreActionHandler.swift +++ b/MVMCore/MVMCore/ActionHandling/MVMCoreActionHandler.swift @@ -158,7 +158,7 @@ public protocol MVMCoreJSONActionHandlerProtocol: MVMCoreActionHandlerProtocol { errorObject.requestUrl = browserUrl } if let humanReadableMessage = (error as? HumanReadableDecodingErrorProtocol)?.readableDescription { - errorObject.messageToLog = humanReadableMessage + errorObject.messageToLog = "Failed to decode the \(actionType ?? "") action model. " + humanReadableMessage } defaultHandleActionError(errorObject, additionalData: additionalData) } diff --git a/MVMCore/MVMCore/Utility/ReadableDecodingErrors.swift b/MVMCore/MVMCore/Utility/ReadableDecodingErrors.swift index 4c9b991..731d9f0 100644 --- a/MVMCore/MVMCore/Utility/ReadableDecodingErrors.swift +++ b/MVMCore/MVMCore/Utility/ReadableDecodingErrors.swift @@ -30,7 +30,7 @@ extension ModelRegistry.Error: HumanReadableDecodingErrorProtocol { public var readableDescription: String { switch (self) { case .decoderErrorModelNotMapped(let identifier, let codingKey, let codingPath) where identifier != nil && codingKey != nil && codingPath != nil: - return "Model identifier \"\(identifier!)\" is not mapped for \"\(codingKey!.stringValue)\" @ \(codingPath!.map { return $0.stringValue })" + return "Model identifier \"\(identifier!)\" is not mapped for \"\(codingKey!.stringValue)\" @ \(codingPath!.map { return $0.stringValue })" case .decoderErrorObjectNotPresent(let codingKey, let codingPath): return "Required model \"\(codingKey.stringValue)\" was not found @ \(codingPath.map { return $0.stringValue })"