|
Sample and reference data loading in folio-ansible currently uses a POST to the endpoint to create the data. In order for the tasks to be (at least loosely) idempotent, they have to tolerate the error that is returned for a duplicate record key – a 400 or a 422, depending on the endpoint. This is also the error code returned for failed record validation.
If we switch the HTTP method to PUT, we may be able to have a loosely idempotent Ansible role (it will replace all the data, which is not necessarily ideal, as for example the metadata property will change) while failing as appropriate if there is a validation problem with the sample data.
|