errorlib: fix Sentry context syntax issue

* Fixes Python syntax issue that slipped in the Sentry context support
  commit d73bd94b2fbe8666af31dfec25c334c466e6f6df.
  (addresses #1960) (PR #2147)

Signed-off-by: Tibor Simko <tibor.simko@cern.ch>
BibCirculation: fix for CERN returnees

Acked-by: Tibor Simko <tibor.simko@cern.ch>
BibRecord: Cleanup `record_get_field_values()`

* Halve the mccabe complexity of `record_get_field_values()`, add
  assertions and fix docstring.