mirror of
https://gitea.invidious.io/iv-org/invidious.git
synced 2024-08-15 00:53:41 +00:00
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."}
This commit is contained in:
commit
436a61e3bb
1 changed files with 1 additions and 1 deletions
|
@ -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|
|
||||
|
|
Loading…
Reference in a new issue