add convenience function for ajax erorr
Merge pull request #8 from OliverUv/master

add convenience function for ajax erorr