From 4b46ada79420ecface1a72e3692710d01a1ba80a Mon Sep 17 00:00:00 2001 From: Blake Watters Date: Thu, 19 Jan 2012 09:35:46 -0500 Subject: [PATCH] Copy the error mapping to the temporary mapping provider to ensure error handling is correct. --- Code/ObjectMapping/RKObjectLoader.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Code/ObjectMapping/RKObjectLoader.m b/Code/ObjectMapping/RKObjectLoader.m index 18ea48a6..069cc860 100644 --- a/Code/ObjectMapping/RKObjectLoader.m +++ b/Code/ObjectMapping/RKObjectLoader.m @@ -255,6 +255,9 @@ mappingProvider = [RKObjectMappingProvider mappingProvider]; NSString *rootKeyPath = configuredObjectMapping.rootKeyPath ? configuredObjectMapping.rootKeyPath : @""; [mappingProvider setMapping:configuredObjectMapping forKeyPath:rootKeyPath]; + + // Copy the error mapping from our configured mappingProvider + mappingProvider.errorMapping = self.mappingProvider.errorMapping; } else { RKLogDebug(@"No object mapping provider, using mapping provider from parent object manager to perform KVC mapping"); mappingProvider = self.mappingProvider;