[HatoholUserConfig][test] Extract the commonly usable error callback as a function.