code smells error session created setError() method