Updated promise error handling so an error on one message is caught and doesn't prevent the other messages after it from sending