Pass errors correctly