calions-app/jsonapi-http-retry/1.0.0

NOTE: the latest version is 2.0.0

Renamed to FabienHenon/jsonapi-http-retry. It is published under that name, and new versions come out there.

Versions published as calions-app/jsonapi-http-retry still install under that name. 2 versions of 2 come from the new location (see their notes).

Rerouted (renamed, verified). The GitHub user or repository was renamed. The tag is still there, at the new name. The Lamdera package server serves a copy recovered from https://github.com/FabienHenon/jsonapi-http-retry.

What we checked: The repo moved to github.com/FabienHenon/jsonapi-http-retry. Rebuilt with git archive from commit 22534bc96207 of https://github.com/FabienHenon/jsonapi-http-retry (zip prefix calions-app-jsonapi-http-retry-22534bc/, America/Los_Angeles times): the zip is byte-identical to the one package.elm-lang.org recorded, SHA-1 2bd36759130aede5ac4cc4ac8b137aced9c490ea.

The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.

Details · package.elm-lang.org's zip: https://github.com/calions-app/jsonapi-http-retry/zipball/1.0.0/

Http.Retry

Add retries to a jsonapi http task, based on a list of retry policies, until any one of the policies fail too.

List (Policy RequestError)
-> Task Never (RemoteData RequestError data)
-> Task Never (RemoteData RequestError data)

Given a list of error handling Policy from Retry package we can make our originalTask retry on failure until any one of the Policy fails.

originalTask
    |> Http.Retry.with
        [ Retry.maxDuration 7000
        , Retry.exponentialBackoff { interval = 500, maxInterval = 3000 }
        ]
        [ Http.Retry.onUnauthenticatedStatus ]
    |> Task.perform DidOriginalTask

Failure conditions

FailureCondition contains a function that filter request errors

To use with with function. Filters errors to be retried by retrying errors based on the status code

To use with with function. Filters errors to be retried by retrying errors base on the 401 status code

To use with with function. Filters errors to be retried by retrying errors base on the 403 status code

To use with with function. Filters errors to be retried by retrying all network errors

To use with with function. Filters errors to be retried by retrying all timeout errors

To use with with function. Filters errors to be retried by retrying all errors