diff --git a/Source/MMRecord/MMRecord.m b/Source/MMRecord/MMRecord.m index eb93d3d..10948ff 100644 --- a/Source/MMRecord/MMRecord.m +++ b/Source/MMRecord/MMRecord.m @@ -733,7 +733,7 @@ + (NSArray*)recordsFromResponseObject:(id)responseObject [parameters setObject:responseObject forKey:MMRecordDebuggerParameterResponseObject]; } - [debugger handleErrorCode:MMRecordErrorCodeInvalidResponseFormat withParameters:parameters]; + [debugger handleErrorCode:MMRecordErrorCodeEmptyResultSet withParameters:parameters]; return nil; } diff --git a/Source/MMRecord/MMRecordDebugger.h b/Source/MMRecord/MMRecordDebugger.h index 8417811..a7cc93b 100644 --- a/Source/MMRecord/MMRecordDebugger.h +++ b/Source/MMRecord/MMRecordDebugger.h @@ -78,6 +78,7 @@ typedef NS_ENUM(NSInteger, MMRecordErrorCode) { MMRecordErrorCodeMissingRecordPrimaryKey = 3, MMRecordErrorCodeInvalidEntityDescription = 4, MMRecordErrorCodeInvalidResponseFormat = 6, + MMRecordErrorCodeEmptyResultSet = 7, MMRecordErrorCodeCoreDataFetchError = 700, MMRecordErrorCodeCoreDataSaveError = 701, MMRecordErrorCodeUnknown = 999 diff --git a/Source/MMRecord/MMRecordDebugger.m b/Source/MMRecord/MMRecordDebugger.m index ef81ede..a2f41c3 100644 --- a/Source/MMRecord/MMRecordDebugger.m +++ b/Source/MMRecord/MMRecordDebugger.m @@ -163,6 +163,8 @@ - (MMRecordLoggingLevel)loggingLevelForErrorCode:(MMRecordErrorCode)errorCode { return MMRecordLoggingLevelInfo; case MMRecordErrorCodeInvalidEntityDescription: return MMRecordLoggingLevelInfo; + case MMRecordErrorCodeEmptyResultSet: + return MMRecordLoggingLevelInfo; default: break; } @@ -248,6 +250,9 @@ - (NSString *)descriptionForErrorCode:(MMRecordErrorCode)errorCode { result = NSLocalizedString(@"Invalid Response Format.", @"The server response was in an unexpected format that could not be handled by MMRecord."); break; + case MMRecordErrorCodeEmptyResultSet: + result = NSLocalizedString(@"Empty Result Set.", @"The result set returned from the server is empty. This is a warning, and may not be the result an error."); + break; case MMRecordErrorCodeMissingRecordPrimaryKey: result = NSLocalizedString(@"Missing Record Primary Key. No primary key was found for this proto record. This could mean that the primary key was not defined on the Managed Object Model, or that no primary key was injected into the population process.", @"Missing Record Primary Key. No primary key was found for this proto record. This could mean that the primary key was not defined on the Managed Object Model, or that no primary key was injected into the population process.");