Add missing error code setting