Catch errors when uploading attachments in dynamic view