fix error handling path, #24070