metno / discovery-metadata-catalog-ingestor

Apache License 2.0
1 stars 1 forks source link

API returns strange message when a user tries to insert non-existing files #194

Closed mortenwh closed 1 year ago

mortenwh commented 1 year ago

E.g.:

curl --data-binary "@not-existing.xml" https://dmci.s-enda-dev.k8s.met.no/v1/insert
Warning: Couldn't read data from file "not-existing.xml", this makes an empty 
Warning: POST.
Document is empty, line 1, column 1 (<string>, line 1)
 UUID : 747b1a1e-5af3-48de-a4a3-8c76c0a2765d

The UUID is the uuid of the rejected file in DMCI. This may in general be useful to provide, but we need to specify what it is, and we probably don't need to store a rejected file in this specific case.

For the return message, maybe add after "POST.": "Nothing added to metadata catalogs."