metacatui icon indicating copy to clipboard operation
metacatui copied to clipboard

Handle resource map save failures better

Open laurenwalker opened this issue 5 years ago • 3 comments

Things have improved with #1381, but when the DataPackage collection save() function gets done saving all the member models, we need to catch errors better and save some kind of resource map so all the files aren't orphaned.

If it's a RDF serialization issue, I think we could try creating a new DataPackage collection, add the member models, and re-serialize the RDF from scratch. This should be pretty rare after change to #1381, but it's an added layer of error handling.

Save errors from Metacat should be parsed better and the RDF should be edited according to the save error.

laurenwalker avatar May 13 '20 19:05 laurenwalker

And if its just a network failure, then maybe a retry is in order? At a minimum, when the RDF fails to be written, somehow the package needs to be marked as still unsaved so that it can be recovered, fixed, and retried. Does each object in the model (e.g., package members, metadata, rdf file) have status flags indicating 1) if it was successfully uploaded, and 2) if it has been changed at all since the last upload?

mbjones avatar May 13 '20 19:05 mbjones

And if its just a network failure, then maybe a retry is in order?

This feature already exists.

Does each object in the model (e.g., package members, metadata, rdf file) have status flags indicating 1) if it was successfully uploaded, and 2) if it has been changed at all since the last upload?

Yes, each model has an uploadStatus, with statuses of either complete, error, in progress or in the queue.

laurenwalker avatar May 13 '20 21:05 laurenwalker

From #1379 (duplicate): When a resource map fails to save for whatever reason, we need to try again somehow. Error messages from Metacat are pretty opaque, so either error messages need to be more explicit (returning exactly what part of the rMap is invalid), or MetacatUI needs to re-serialize a resourcemap somehow.

robyngit avatar Aug 12 '25 18:08 robyngit