added  errorhandler and fixed statuscode
Merge remote-tracking branch 'origin/master'