The extension method forJsonRest define : ifFail: [ self checkHttpCode: response statusLine code. ]; Problem => response here is the previous response => previous status code => 200 Need to handle ifFail differently