MVAPCT-273
This commit is contained in:
parent
3c8af09752
commit
cf3d7810d4
@ -158,7 +158,7 @@ public protocol MVMCoreJSONActionHandlerProtocol: MVMCoreActionHandlerProtocol {
|
|||||||
errorObject.requestUrl = browserUrl
|
errorObject.requestUrl = browserUrl
|
||||||
}
|
}
|
||||||
if let humanReadableMessage = (error as? HumanReadableDecodingErrorProtocol)?.readableDescription {
|
if let humanReadableMessage = (error as? HumanReadableDecodingErrorProtocol)?.readableDescription {
|
||||||
errorObject.messageToLog = humanReadableMessage
|
errorObject.messageToLog = "Failed to decode the \(actionType ?? "") action model. " + humanReadableMessage
|
||||||
}
|
}
|
||||||
defaultHandleActionError(errorObject, additionalData: additionalData)
|
defaultHandleActionError(errorObject, additionalData: additionalData)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,7 +30,7 @@ extension ModelRegistry.Error: HumanReadableDecodingErrorProtocol {
|
|||||||
public var readableDescription: String {
|
public var readableDescription: String {
|
||||||
switch (self) {
|
switch (self) {
|
||||||
case .decoderErrorModelNotMapped(let identifier, let codingKey, let codingPath) where identifier != nil && codingKey != nil && codingPath != nil:
|
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):
|
case .decoderErrorObjectNotPresent(let codingKey, let codingPath):
|
||||||
return "Required model \"\(codingKey.stringValue)\" was not found @ \(codingPath.map { return $0.stringValue })"
|
return "Required model \"\(codingKey.stringValue)\" was not found @ \(codingPath.map { return $0.stringValue })"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user