1 parent f45e4c4 commit 3c60f2cCopy full SHA for 3c60f2c
1 file changed
lib/workers/child.ex
@@ -10,6 +10,7 @@ defmodule Mudan.Workers.User do
10
11
case starred(profile.github_token, repo_id) do
12
false -> start(profile.github_token, profile.uid, repo_id)
13
+ 401 -> {:error, :bad_credentials}
14
_ -> {:cancel, :already_starred}
15
end
16
@@ -90,6 +91,7 @@ defmodule Mudan.Workers.User do
90
91
case Req.get(url, headers: headers) do
92
{:ok, %Req.Response{status: 204}} -> true
93
{:ok, %Req.Response{status: 404}} -> false
94
+ {:ok, %Req.Response{status: 401}} -> 401
95
96
97
0 commit comments