From d7b80e87edcfbab7692352c4b19b4307a11d5294 Mon Sep 17 00:00:00 2001 From: Kyle Matthew Hedden Date: Wed, 26 Oct 2022 20:44:18 -0400 Subject: [PATCH 1/2] fix user facing error message for json errors --- MVMCore/MVMCore/Models/JSON/JSONHelper.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MVMCore/MVMCore/Models/JSON/JSONHelper.swift b/MVMCore/MVMCore/Models/JSON/JSONHelper.swift index 775048d..857310b 100644 --- a/MVMCore/MVMCore/Models/JSON/JSONHelper.swift +++ b/MVMCore/MVMCore/Models/JSON/JSONHelper.swift @@ -37,8 +37,9 @@ extension JSONError: LocalizedError, CustomStringConvertible { } } + // Shown to customers. public var errorDescription: String? { - return description + return MVMCoreGetterUtility.hardcodedString(withKey: HardcodedErrorUnableToProcess) } } From 11728703ce2cda935414eee0bc417e081698e853 Mon Sep 17 00:00:00 2001 From: Scott Pfeil Date: Fri, 28 Oct 2022 10:07:36 -0400 Subject: [PATCH 2/2] Add back legacy error code --- MVMCore/MVMCore/ActionHandling/ActionOpenUrlHandler.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/MVMCore/MVMCore/ActionHandling/ActionOpenUrlHandler.swift b/MVMCore/MVMCore/ActionHandling/ActionOpenUrlHandler.swift index 5ed9d2d..085b9a4 100644 --- a/MVMCore/MVMCore/ActionHandling/ActionOpenUrlHandler.swift +++ b/MVMCore/MVMCore/ActionHandling/ActionOpenUrlHandler.swift @@ -40,6 +40,10 @@ open class ActionOpenUrlHandler: MVMCoreJSONActionHandlerProtocol { return "Failed to open url: \(url.absoluteString)" } } + + public var errorCode: Int { + return ErrorCode.linkawayFailed.rawValue + } } /// Creates a url and calls open(url: URL)