Changed approach to error management when calling Twitter API