Introduced error handling of Xively API