better error handling, only accept xml content and status 200