Use throwError where possible instead of fail
This commit is contained in:
parent
b96e22c75c
commit
5f9159aaf4
@ -254,7 +254,7 @@ deleteFork :: AuthMethod am
|
|||||||
deleteFork am owner repo = runExceptT $ do
|
deleteFork am owner repo = runExceptT $ do
|
||||||
(withExceptT show $ ExceptT $ github' (repositoryR owner repo)) >>= \case
|
(withExceptT show $ ExceptT $ github' (repositoryR owner repo)) >>= \case
|
||||||
(Repo { repoFork = Just True }) -> pure ()
|
(Repo { repoFork = Just True }) -> pure ()
|
||||||
_ -> fail "Not a fork"
|
_ -> throwError "Not a fork"
|
||||||
withExceptT show $ ExceptT $ github am (deleteRepoR owner repo)
|
withExceptT show $ ExceptT $ github am (deleteRepoR owner repo)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user