Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better Reporting of Failed Exported Objects #208

Closed
flipmcf opened this issue Jun 8, 2023 · 0 comments · Fixed by #209
Closed

Better Reporting of Failed Exported Objects #208

flipmcf opened this issue Jun 8, 2023 · 0 comments · Fixed by #209
Labels
enhancement New feature or request

Comments

@flipmcf
Copy link
Contributor

flipmcf commented Jun 8, 2023

Currently during an export, an object that throws an exception during export is written to the Error Log and ignored.

I would like to propose we add the obj.absolute_url() to a list of 'failed exports' and .... do something with it....

"do something" might be to simply append it to the end of the json export, or print the list to the form after the export, or write it to a separate file?

For my needs, appending a valid json list of skipped objects at the end of the file "ExportContent" would do nicely.

except Exception:
logger.exception(u"Error exporting %s", obj.absolute_url(), exc_info=True)

try: 
     <snip>...
     item = self.update_export_data(item, obj) 
  
     yield item 
 except Exception: 
     logger.exception(u"Error exporting %s", obj.absolute_url(), exc_info=True) 
@flipmcf flipmcf added the enhancement New feature or request label Jun 8, 2023
@flipmcf flipmcf linked a pull request Jun 8, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant