Über Open CoDE Software Wiki Diskussionen GitLab

Skip to content

Fix errors in logs

Jakob Deller requested to merge fix-errors-in-logs into main

This MR fixes a few long-standing issues we see in our daily error log mails.

Umweltchronik UBA

Apr 02 23:19:51 metadaten harvester[123834]: ERROR harvest{source=Source { name: "umweltchronik-uba", .. }}: harvester: unexpected trailing characters; the end of input was expected: unexpected trailing characters; the end of input was expected
Apr 02 23:19:51 metadaten harvester[123834]: ERROR harvest{source=Source { name: "umweltchronik-uba", .. }}: harvester: the 'year' component could not be parsed: the 'year' component could not be parsed

Is fixed by making the time format more general and not using the stricter ISO format anymore so that negative years are now properly parsed.

Projektsteckbriefe BfN

Apr 02 23:30:05 metadaten harvester[123834]: ERROR harvest{source=Source { name: "projektsteckbriefe-bfn", .. }}: harvester::website_bfn: Failed to parse period of -projektsteckbriefe-flora-incognita-automatische-pflanzenbestimmung-mit-dem-smartphone: Unknown German month name `09`
Apr 02 23:30:15 metadaten harvester[123834]: ERROR harvest{source=Source { name: "projektsteckbriefe-bfn", .. }}: harvester::website_bfn: Failed to parse period of -projektsteckbriefe-umsetzung-eines-nationales-anbauverbotes-fuer-gvo-opt-out: Unknown German month name `11`

Is fixed by hard-coding a shift for the invalid dates causing this issue into the valid range of dates. If anyone pleases, this could be probably made more efficient by using in-place replacement methods.

In addition with MR umwelt-info/infrastruktur/testbetrieb!101 (closed) this should fix all mails from projektsteckbriefe-bfn for now.

Edited by Adam Reichold

Merge request reports

Loading