Add report of successful and unsuccessful imports to Chami web GUI
branchedelac opened this issue · comments
We're gonna start this off by adding some logstash logging.
Purpose:
The report should tell us when records are successfully added/updated, when they fail. When an instance fails to add/update, the ID of that instance should be given. The report should be easy to read for non-programmers.
The following things should be be considered errors/anomalies that need to be communicated:
-
Failure to get a response from Libris -- if the first request fails, is there a retry? How many retry's before error?
-
Libris responds with a success code but request "times out" and no records are returned. When does Chami time out? Why? Does server go down/change IP? How do we identify this error?
-
Failure to get a response from FOLIO -- if the first request fails, is there a retry? How many retry's before error? Or does Chami move on to the next record?
-
Failure to post record(s) to FOLIO -- we should get an error code from the API (need to decide which range of status codes are should be considered errors), and possibly some information in the response body.
-
Transformation error -- eg a record does not contain a mapped, mandatory field (are any elements required in Chami, or do we leave that check to FOLIO?)
-
(Libris ID matches for more than one record in FOLIO -- find out how nightly batch update would react to this? Have we cleaned up duplicate records?)
Not an error but valuable info:
- Libris responds successfully but the response contains no records, an empty "collection"
Examples:
2019-09-28 03:15:00: Scheduled.
3 new instances successfully added to FOLIO.
15 existing FOLIO instances updated.
2019-09-29 03:15:00: Scheduled.
1 new instance failed to be added to FOLIO: 6phfjxsj5hhlf8m
3 existing FOLIO instances failed to be updated: 6phfjxsfsekuhlf8m, 9phfjxsjkli348s, 4phsjdsj5hhlf8y
2019-09-28 03:15:00: Scheduled.
No new or updated records in Libris.
2019-09-29 13:22:19: Manual.
1 new instance successfully added to FOLIO.
2019-09-29 13:27:01: Manual.
1 new instance successfully added to FOLIO.
2019-09-23 13:29:33: Manual.
1 new instance failed to be added to FOLIO: 6phfjxsj5hhlf8m