diff options
| author | Samantaz Fox <coding@samantaz.fr> | 2024-07-10 22:25:31 +0200 |
|---|---|---|
| committer | Samantaz Fox <coding@samantaz.fr> | 2024-07-10 22:25:31 +0200 |
| commit | 436a61e3bbcc39c43e459a991301b2eff60296b4 (patch) | |
| tree | 68ad5a301da3d3577fe16cc2731f59199c85a823 /src | |
| parent | 5e0f55333afd03190d84da8fd21b084775cdf916 (diff) | |
| parent | a9e8aabe1f6be7b6ad52c870a7752bad61945689 (diff) | |
| download | invidious-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.cr | 2 |
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| |
