better error reporting for preview page