Moved twilio error handling code to resources base file