mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-01-12 22:51:50 +08:00
Suppress logging of referential integrity errors if the objectID is temporary as it likely indicates the object is not accessible from the requested context
This commit is contained in:
@@ -169,7 +169,8 @@
|
||||
object = [context existingObjectWithID:objectID error:&error];
|
||||
}];
|
||||
if (! object) {
|
||||
if (error) {
|
||||
// Referential integrity errors often indicates that the temporary objectID does not exist in the specified context
|
||||
if (error && !([objectID isTemporaryID] && [error code] == NSManagedObjectReferentialIntegrityError)) {
|
||||
RKLogError(@"Failed to retrieve managed object with ID %@. Error %@\n%@", objectID, [error localizedDescription], [error userInfo]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user