debug: fix passing an `Error` object in directly