Related to D4542, those missing tests let a mistake pass through.
Update: I also add tests for backward compatibility with old encoded exception schema and I found another bug that I fixed in a dedicated commit.
Updated coverage report for impacted source file: https://jenkins.softwareheritage.org/job/DCORE/job/tests-on-diff/152/coverage/cobertura__coverage_xml/project/api/api___init___py/