bug900668 - Placed check for error ahead of check for response

https://bugzilla.mozilla.org/show_bug.cgi?id=900668