Fix tests and throws Error instead of String.