mutualmobile / MMRecord

Seamless Web Service Integration and Core Data Model Population
MIT License
691 stars 76 forks source link

Empty result set treated as MMRecordErrorCodeInvalidResponseFormat #83

Closed andreacremaschi closed 10 years ago

andreacremaschi commented 10 years ago

Hi, the new release (1.4.0) treats empty return results sets as invalid responses (MMRecord.m:726-738). Is it correct? It would seem perfectly legit to me to receive an empty set as a result, i.e. of a call to a search API.

cnstoll commented 10 years ago

Nope, that's definitely not correct. A little too eager with the error handling on my part. I'll submit an update shortly.

Thanks,

Sent from my iPhone

On Jul 4, 2014, at 8:08 AM, Andrea Cremaschi notifications@github.com wrote:

Hi, the new release (1.4.0) treats empty return results sets as invalid responses (MMRecord.m:726-738). Is it correct? It would seem perfectly legit to me to receive an empty set as a result, i.e. of a call to a search API.

— Reply to this email directly or view it on GitHub.

cnstoll commented 10 years ago

https://github.com/mutualmobile/MMRecord/pull/84

cnstoll commented 10 years ago

Merged into master and also updated pod spec version to 1.4.1. Thanks again for the error report!

One thing worth noting is that its technically now possible to override this behavior via subclassing the error debugger to provide different failure behavior for an error like that. However, in this case I think that was just an oversight on my part, and actually warranted its own error code, which I added and made it a non-failing error by default.

Thanks,

andreacremaschi commented 10 years ago

Thank you!