summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamantaz Fox <coding@samantaz.fr>2024-07-10 22:25:31 +0200
committerSamantaz Fox <coding@samantaz.fr>2024-07-10 22:25:31 +0200
commit436a61e3bbcc39c43e459a991301b2eff60296b4 (patch)
tree68ad5a301da3d3577fe16cc2731f59199c85a823 /src
parent5e0f55333afd03190d84da8fd21b084775cdf916 (diff)
parenta9e8aabe1f6be7b6ad52c870a7752bad61945689 (diff)
downloadinvidious-436a61e3bbcc39c43e459a991301b2eff60296b4.tar.gz
invidious-436a61e3bbcc39c43e459a991301b2eff60296b4.tar.bz2
invidious-436a61e3bbcc39c43e459a991301b2eff60296b4.zip
API: Fix error code for disabled popular endpoint (#4296)
When visiting /api/v1/popular and popular endpoint is disabled Before: 500 {"error":"Closed stream"} After 403 {"error":"Administrator has disabled this endpoint."}
Diffstat (limited to 'src')
-rw-r--r--src/invidious/routes/api/v1/feeds.cr2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/invidious/routes/api/v1/feeds.cr b/src/invidious/routes/api/v1/feeds.cr
index 41865f34..fea2993c 100644
--- a/src/invidious/routes/api/v1/feeds.cr
+++ b/src/invidious/routes/api/v1/feeds.cr
@@ -31,7 +31,7 @@ module Invidious::Routes::API::V1::Feeds
if !CONFIG.popular_enabled
error_message = {"error" => "Administrator has disabled this endpoint."}.to_json
- haltf env, 400, error_message
+ haltf env, 403, error_message
end
JSON.build do |json|