fetchMessages: error handling + subject for lua