Skip to content

Commit

Permalink
Return status code 422 instead of 503.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefansundin committed Jan 14, 2021
1 parent aab5094 commit ef40b5e
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion app/dailymotion.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ class Dailymotion < HTTP
end

error App::DailymotionError do |e|
status 503
status 422
"There was a problem talking to Dailymotion. Please try again in a moment."
end
2 changes: 1 addition & 1 deletion app/google.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Google < HTTP
end

error App::GoogleError do |e|
status 503
status 422
if (e.data["error"]["errors"][0]["reason"] == "accessNotConfigured" rescue false)
"Please enable the appropriate API for this project in the Google Developer Console."
else
Expand Down
2 changes: 1 addition & 1 deletion app/imgur.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ class Imgur < HTTP
end

error App::ImgurError do |e|
status 503
status 422
"There was a problem talking to Imgur. Please try again in a moment."
end
2 changes: 1 addition & 1 deletion app/instagram.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def self.get_post(id, opts={})
end

error App::InstagramError do |e|
status 503
status 422
"There was a problem talking to Instagram. Please try again in a moment."
end

Expand Down
2 changes: 1 addition & 1 deletion app/mixcloud.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ class Mixcloud < HTTP
end

error App::MixcloudError do |e|
status 503
status 422
"There was a problem talking to Mixcloud. Please try again in a moment."
end
2 changes: 1 addition & 1 deletion app/periscope.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ def self.get_broadcasts(user_id)
end

error App::PeriscopeError do |e|
status 503
status 422
"There was a problem talking to Periscope. Please try again in a moment."
end
2 changes: 1 addition & 1 deletion app/soundcloud.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ class Soundcloud < HTTP
end

error App::SoundcloudError do |e|
status 503
status 422
"There was a problem talking to SoundCloud. Please try again in a moment."
end
2 changes: 1 addition & 1 deletion app/speedrun.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ def self.resolve_id(type, id)
end

error App::SpeedrunError do |e|
status 503
status 422
"There was a problem talking to speedrun.com. Please try again in a moment."
end
2 changes: 1 addition & 1 deletion app/twitch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ class TwitchToken < HTTP
end

error App::TwitchError do |e|
status 503
status 422
"There was a problem talking to Twitch. Please try again in a moment."
end
2 changes: 1 addition & 1 deletion app/twitter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ def self.get(*args, &block)
end

error App::TwitterError do |e|
status 503
status 422
"There was a problem talking to Twitter. Please try again in a moment."
end
2 changes: 1 addition & 1 deletion app/vimeo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ class Vimeo < HTTP
end

error App::VimeoError do |e|
status 503
status 422
"There was a problem talking to Vimeo. Please try again in a moment."
end

0 comments on commit ef40b5e

Please sign in to comment.