[Database] Added option to set error mode