Changed error from factory to service