diff options
author | Starfall <us@starfall.systems> | 2022-11-14 18:33:13 -0600 |
---|---|---|
committer | Starfall <us@starfall.systems> | 2022-11-14 18:33:13 -0600 |
commit | efa1bd9451c2aac68ce4576abdbbcdc266291f0f (patch) | |
tree | 4cfb9e485a912558e21032a77674562bf3fea635 /app/models/trends | |
parent | b07b6b9f339b604f9af150eb10ac1486eca8f189 (diff) | |
parent | ceafd1f68f1f1b57c998adf693678059f9aaa70c (diff) |
Merge remote-tracking branch 'glitch/main'
Diffstat (limited to 'app/models/trends')
-rw-r--r-- | app/models/trends/preview_card_filter.rb | 2 | ||||
-rw-r--r-- | app/models/trends/preview_card_provider_filter.rb | 4 | ||||
-rw-r--r-- | app/models/trends/status_filter.rb | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/app/models/trends/preview_card_filter.rb b/app/models/trends/preview_card_filter.rb index 0a81146d4..f0214c3f0 100644 --- a/app/models/trends/preview_card_filter.rb +++ b/app/models/trends/preview_card_filter.rb @@ -40,7 +40,7 @@ class Trends::PreviewCardFilter when 'locale' PreviewCardTrend.where(language: value) else - raise "Unknown filter: #{key}" + raise Mastodon::InvalidParameterError, "Unknown filter: #{key}" end end diff --git a/app/models/trends/preview_card_provider_filter.rb b/app/models/trends/preview_card_provider_filter.rb index abfdd07e8..219793f01 100644 --- a/app/models/trends/preview_card_provider_filter.rb +++ b/app/models/trends/preview_card_provider_filter.rb @@ -30,7 +30,7 @@ class Trends::PreviewCardProviderFilter when 'status' status_scope(value) else - raise "Unknown filter: #{key}" + raise Mastodon::InvalidParameterError, "Unknown filter: #{key}" end end @@ -43,7 +43,7 @@ class Trends::PreviewCardProviderFilter when 'pending_review' PreviewCardProvider.pending_review else - raise "Unknown status: #{value}" + raise Mastodon::InvalidParameterError, "Unknown status: #{value}" end end end diff --git a/app/models/trends/status_filter.rb b/app/models/trends/status_filter.rb index cb0f75d67..de435a026 100644 --- a/app/models/trends/status_filter.rb +++ b/app/models/trends/status_filter.rb @@ -40,7 +40,7 @@ class Trends::StatusFilter when 'locale' StatusTrend.where(language: value) else - raise "Unknown filter: #{key}" + raise Mastodon::InvalidParameterError, "Unknown filter: #{key}" end end |