summaryrefslogtreecommitdiffstats
path: root/lib/Service/FeedServiceV2.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Service/FeedServiceV2.php')
-rw-r--r--lib/Service/FeedServiceV2.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Service/FeedServiceV2.php b/lib/Service/FeedServiceV2.php
index 4dddc9408..3e02b3971 100644
--- a/lib/Service/FeedServiceV2.php
+++ b/lib/Service/FeedServiceV2.php
@@ -192,10 +192,6 @@ class FeedServiceV2 extends Service
?string $password = null,
bool $full_discover = true
): Entity {
- if ($this->existsForUser($userId, $feedUrl)) {
- throw new ServiceConflictException('Feed with this URL exists');
- }
-
try {
/**
* @var Feed $feed
@@ -219,6 +215,10 @@ class FeedServiceV2 extends Service
}
}
+ if ($this->existsForUser($userId, $feedUrl)) {
+ throw new ServiceConflictException('Feed with this URL exists');
+ }
+
if ($feed === null) {
throw new ServiceNotFoundException('Failed to fetch feed');
}