Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve harvest error reporting (#1257)
Previously, when an item failed to deserialize, we logged this: ``` WARN tobira::sync::harvest > Could not deserialize item in harvest response for kind 'event' (updated 2024-10-02 09:01:49.038 UTC) ``` This always required, manually finding the item with said `updated` time, then writing some code to actually find out whats wrong. With this PR, Tobira will log an actual useful error and the whole raw value. See this (I added dummy required field `title2` to cause an error): ``` ERROR tobira::sync::harvest > Could not deserialize 'event' harvest item -> ignoring. Error: missing field `title2` DEBUG tobira::sync::harvest > Raw value: { > "acl": { > "read": [ > "ROLE_ANONYMOUS" > ] > }, > "captions": [], > "created": 1460505600000, > "creators": [ > "Dissertori, Günther" > ], > "description": null, > "duration": 5637803, > "endTime": 1460543400000, > "id": "09828f52-b684-32b3-a614-cbb96fc63ee8", > "isLive": false, > "kind": "event", > "metadata": { > "dcterms": { > "contributor": [ > "D-PHYS" > ], > "issued": [ > "2016-04-14" > ], > "language": [ > "deu" > ], > "license": [ > "CC-BY-NC-ND" > ], > "publisher": [ > "ETH Zürich, ID-MMS; Schweiz" > ], > "rightsHolder": [ > "ETH Zürich, Schweiz" > ], > "spatial": [ > "Zürich, Schweiz; ETH Zürich, HPV G 5" > ], > "temporal": [ > "start=2016-04-13T08:45:00Z; end=2016-04-13T10:30:00Z; scheme=W3C-DTF;" > ], > "type": [ > "MovingImage" > ] > }, > "http://ethz.ch/video/metadata": { > "owner": [ > "Dissertori, Günther" > ] > } > }, > "partOf": "97eea518-409b-372b-b47a-54483658fc0c", > "segments": [], > "slideText": null, > "startTime": 1460537100000, > "thumbnail": "https://tobira-test-oc.ethz.ch/static/mh_default_org/engage-player/09828f52-b684-32b3-a614-cbb96fc63ee8/0579ed69-56f2-4d4d-878d-d85210e8df30/presentation_0dd34669_9a79_4a1b_be52_216ba65f4688_3_000s_player_preview_16_9_all_to_16_9_640x360.jpg", > "timelinePreview": null, > "title": "Einführung in die Kern- und Teilchenphysik", > "tracks": [ > { > "flavor": "presentation/delivery", > "isMaster": false, > "mimetype": "video/webm", > "resolution": [ > 640, > 360 > ], > "uri": "https://tobira-test-oc.ethz.ch/static/mh_default_org/engage-player/09828f52-b684-32b3-a614-cbb96fc63ee8/82d70840-8acc-41aa-9c0d-9236be3e4112/presentation_0dd34669_9a79_4a1b_be52_216ba65f4688.webm" > }, > { > "flavor": "presentation/delivery", > "isMaster": false, > "mimetype": "video/mp4", > "resolution": [ > 1280, > 720 > ], > "uri": "https://tobira-test-oc.ethz.ch/static/mh_default_org/engage-player/09828f52-b684-32b3-a614-cbb96fc63ee8/5f782138-8194-4368-8543-26c284d2b168/presentation_0dd34669_9a79_4a1b_be52_216ba65f4688.mp4" > }, > { > "flavor": "presentation/delivery", > "isMaster": false, > "mimetype": "video/webm", > "resolution": [ > 1280, > 720 > ], > "uri": "https://tobira-test-oc.ethz.ch/static/mh_default_org/engage-player/09828f52-b684-32b3-a614-cbb96fc63ee8/4b776ef3-f1bd-4fe9-be16-f828374cdd2a/presentation_0dd34669_9a79_4a1b_be52_216ba65f4688.webm" > }, > { > "flavor": "presentation/delivery", > "isMaster": false, > "mimetype": "video/mp4", > "resolution": [ > 640, > 360 > ], > "uri": "https://tobira-test-oc.ethz.ch/static/mh_default_org/engage-player/09828f52-b684-32b3-a614-cbb96fc63ee8/ccab01b9-f1c6-45b0-a6a5-c4648c5d96dc/presentation_0dd34669_9a79_4a1b_be52_216ba65f4688.mp4" > } > ], > "updated": 1626161268818 > } ```
- Loading branch information