aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/elm')
-rw-r--r--src/client/elm/ServerCommunication.elm6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/client/elm/ServerCommunication.elm b/src/client/elm/ServerCommunication.elm
index 70612cb..3ecfc3b 100644
--- a/src/client/elm/ServerCommunication.elm
+++ b/src/client/elm/ServerCommunication.elm
@@ -14,6 +14,8 @@ import Debug
import SimpleHTTP exposing (..)
+import Persona exposing (operations)
+
import Model.User exposing (UserId)
import Model.Payment exposing (..)
import Model.View.LoggedIn.Add exposing (Frequency(..))
@@ -50,6 +52,10 @@ sendRequest communication =
SignIn assertion ->
post ("/signIn?assertion=" ++ assertion)
|> flip Task.andThen (always initViewAction)
+ |> flip Task.onError (\err ->
+ Signal.send operations.address Persona.SignOut
+ |> flip Task.andThen (always <| Task.fail err)
+ )
AddPayment userId name cost ->
post (addPaymentURL name cost Punctual)