summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Brahmer <info@b-brahmer.de>2022-08-05 12:36:27 +0200
committerBenjamin Brahmer <info@b-brahmer.de>2022-08-05 12:36:27 +0200
commit0e3b664647c7b15a3b169e543b2e84b737df85ba (patch)
tree3b93a597fc38c9e8ce7b2f4fb525c2a4a0fbe106
parente84f4c74f424ddacee6e661e7226607d3cfce774 (diff)
Execute feed check after the final url is found
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
-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');
}