From 0ebe3bd751f2814ccdc613fbc1e4738fe96cb5ea Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Tue, 11 Jan 2022 20:57:42 +0200 Subject: [PATCH] util/create-schema-dspace.py: update comment --- util/create-schema-dspace.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/util/create-schema-dspace.py b/util/create-schema-dspace.py index d2d56512..ab7cbf9e 100755 --- a/util/create-schema-dspace.py +++ b/util/create-schema-dspace.py @@ -114,7 +114,8 @@ def create_schema(schema): print(f" Schema already exists: {schema['prefix']}") return False - # DSpace responds with HTTP 415 if ...? + # DSpace responds with HTTP 415 if we POST bad data like a malformed JSON + # or a request without headers, etc. elif request.status_code == requests.codes.unsupported_media_type: sys.stderr.write(f" Could not create schema: {schema['prefix']}\n") sys.stderr.write(f" HTTP error code: {request.status_code}\n") @@ -161,7 +162,8 @@ def create_field(schema_prefix, field): print(f" Field already exists: {field['name']}") return False - # DSpace responds with HTTP 415 if ...? + # DSpace responds with HTTP 415 if we POST bad data like a malformed JSON + # or a request without headers, etc. elif request.status_code == requests.codes.unsupported_media_type: sys.stderr.write(f" Could not create field: {field['name']}.\n") sys.stderr.write(f" HTTP error code: {request.status_code}\n")