From aae6c11083bb59eeeb8c5bc167a29a66b61e9b3c Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Tue, 16 Jul 2019 20:36:03 +0300 Subject: [PATCH] Track server version --- lib/redux/auth/auth_middleware.dart | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/redux/auth/auth_middleware.dart b/lib/redux/auth/auth_middleware.dart index 7903d38a2..9d1875be4 100644 --- a/lib/redux/auth/auth_middleware.dart +++ b/lib/redux/auth/auth_middleware.dart @@ -86,11 +86,12 @@ Middleware _createLoginRequest(AuthRepository repository) { } }).catchError((Object error) { print(error); - if (error.toString().contains('No host specified in URI')) { - store.dispatch(UserLoginFailure('Please check the URL is correct')); - } else { - store.dispatch(UserLoginFailure(error.toString())); + var message = error.toString(); + if (message.contains('No host specified in URI')) { + message = 'Please check the URL is correct'; } + message += ', you may need to add /public to the URL'; + store.dispatch(UserLoginFailure(message)); }); next(action);