Skip to content
Snippets Groups Projects
Commit 9634364b authored by Andreas Domanowski's avatar Andreas Domanowski
Browse files

Add rudimentary error handling to POST requests

parent 853f1a71
No related branches found
No related tags found
1 merge request!1Hedgedoc import
......@@ -77,6 +77,8 @@ def process_archive_export(archive_file, instance_url, lookup_map, session_id, u
"creating a new, random path")
new_url = import_single_document(instance_url, "", document_content, session_id)
print(f"New URL after document migration without migrating the URL/subpath: {new_url}")
else:
raise SystemExit("Could not create document. Please check your session cookie. Aborting...")
urls_to_visit.append(new_url)
print()
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment