Fixed the way Angular POSTS data
Added error code to checkError to support responses such as BadRequest, NotFound, etc.