Use throwError where possible instead of fail

This commit is contained in:
Julian Ospald 2020-01-30 20:16:01 +01:00
parent b96e22c75c
commit 5f9159aaf4
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28
1 changed files with 1 additions and 1 deletions

View File

@ -254,7 +254,7 @@ deleteFork :: AuthMethod am
deleteFork am owner repo = runExceptT $ do
(withExceptT show $ ExceptT $ github' (repositoryR owner repo)) >>= \case
(Repo { repoFork = Just True }) -> pure ()
_ -> fail "Not a fork"
_ -> throwError "Not a fork"
withExceptT show $ ExceptT $ github am (deleteRepoR owner repo)