Skip to content

Commit d5ec916

Browse files
committed
handle access blocked case in api response
1 parent f58b926 commit d5ec916

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/algora/integrations/github/client.ex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ defmodule Algora.Github.Client do
4040
end
4141
end
4242

43+
defp maybe_handle_error(%{"message" => "Repository access blocked"} = body) do
44+
{:error, body}
45+
end
46+
4347
defp maybe_handle_error(%{"message" => message, "status" => status} = body) do
4448
case Integer.parse(status) do
4549
{code, _} when code >= 400 -> {:error, "#{code} #{message}"}

0 commit comments

Comments
 (0)