Permalink
Browse files

Copy the error mapping to the temporary mapping provider to ensure er…

…ror handling is correct.
  • Loading branch information...
1 parent d69adcc commit 4b46ada79420ecface1a72e3692710d01a1ba80a @blakewatters blakewatters committed Jan 19, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 Code/ObjectMapping/RKObjectLoader.m
@@ -255,6 +255,9 @@ - (RKObjectMappingResult*)performMapping:(NSError**)error {
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;

0 comments on commit 4b46ada

Please sign in to comment.