Added Error object instead of string