Adds ability to handle xhr error status - Fixes #50
Build