[Config] fix error handler restoration in test
bug #13075 [Config] fix error handler restoration in test (nicolas-grekas)

This PR was merged into the 2.3 branch.

Discussion
----------

[Config] fix error handler restoration in test

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Commits
-------

266afeb [Config] fix error handler restoration in test