tu-graz-library / invenio-curations

MIT License
3 stars 3 forks source link

Improve the error message #14

Open max-moser opened 2 months ago

max-moser commented 2 months ago

Right now, when the draft is saved, the error message says:

Record saved with validation errors:

    Unknown field: Missing curation request. Please create a curation request, if the record is ready to be published.

image


From my understanding this is done because the deposit form only shows certain hard-coded error types. However, the curations aren't actually implemented via (custom) fields. The error message itself is fine, but it would be nicer if the "Unknown field" weren't there.

rekt-hard commented 1 month ago

Your assumption about certain error types is correct. This was part of a first implementation with a separate UI box for curations. It was implemented this way, to make sure a user understands that a curation request is required before being able to publish. Since we now have a tight integration with the deposit box, the publish button will not be visible until after the curation request has been accepted.

In general: Maybe we can first tackle the question, if this should be reported as a validation error. Per se, the record does not know about a request. Updating a record should maybe only report validation errors on the record itself. Also with the tight UI integration, the whole validation error might not be relevant anymore.