Setting error instead of throwing