Skip to content

Commit

Permalink
Remove reference to old API function.
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonkearns committed Oct 31, 2023
1 parent 57dccef commit 6f1d060
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/FatalError.elm
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ For example, if you wanted to handle possible errors to present them to the user
BackendTask.Http.getJson "https://api.github.com/repos/dillonkearns/elm-pages"
(Decode.field "description" Decode.string)
|> BackendTask.onError
(\error ->
case FatalError.unwrap error of
(\{ recoverable } ->
case recoverable of
BackendTask.Http.BadStatus metadata string ->
if metadata.statusCode == 401 || metadata.statusCode == 403 || metadata.statusCode == 404 then
BackendTask.succeed "Either this repo doesn't exist or you don't have access to it."
Expand Down

0 comments on commit 6f1d060

Please sign in to comment.