Back before 0.10.0 both ‘error’ and ‘errors’ messages ‘just worked’ with RestKit. I see that in 0.10.0 you can set the rootKeyPath for the error mapping.
objectManager.mappingProvider.errorMapping.rootKeyPath = @"errors";
However I can only set it to error xor errors. To me this seems like a regression. What am I missing?
In 0.10.0 RestKit added the error context which only tries to map the response to an error mapping if the status code is 4xx or 5xx but they only allow for one top level key path (as far as I know). Thus I couldn’t map both ‘errors’ and ‘errors’. I tried to fix this without modifying restkit but I had to modify one line which you can see in my branch
https://github.com/stevemoser/RestKit/tree/fix-errors-context
Then when I setup my error mapping it looks like this: