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
Branches hydro
Tags 0.1.35
1 merge request!1Hedgedoc import
This commit is part of merge request !1. Comments created here will be created in the context of that merge request.
...@@ -77,6 +77,8 @@ def process_archive_export(archive_file, instance_url, lookup_map, session_id, u ...@@ -77,6 +77,8 @@ def process_archive_export(archive_file, instance_url, lookup_map, session_id, u
"creating a new, random path") "creating a new, random path")
new_url = import_single_document(instance_url, "", document_content, session_id) 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}") 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) urls_to_visit.append(new_url)
print() print()
else: else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment