Adds error handling to the XML response from merriam