This to me looks like gh issue waiting to happen. Wrap it in try-catch and print `log.warn()` on error.