summaryrefslogtreecommitdiffhomepage
path: root/gui/src/renderer/components
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2019-03-06 11:15:27 +0100
committerAndrej Mihajlov <and@mullvad.net>2019-03-07 13:48:30 +0100
commit07c3a6f1c07d776686fbb8842b677424bdec8fca (patch)
tree420bf01ed88317a3c6e3501307e4bc4f393dacf6 /gui/src/renderer/components
parent8c4673bbf71924ae321db08d8a9b413ff06dfb50 (diff)
downloadmullvadvpn-07c3a6f1c07d776686fbb8842b677424bdec8fca.tar.xz
mullvadvpn-07c3a6f1c07d776686fbb8842b677424bdec8fca.zip
Refactor AuthFailureError into parseAuthFailure()
Diffstat (limited to 'gui/src/renderer/components')
-rw-r--r--gui/src/renderer/components/Connect.tsx2
-rw-r--r--gui/src/renderer/components/NotificationArea.tsx4
2 files changed, 3 insertions, 3 deletions
diff --git a/gui/src/renderer/components/Connect.tsx b/gui/src/renderer/components/Connect.tsx
index a0ebe53820..657d030c6b 100644
--- a/gui/src/renderer/components/Connect.tsx
+++ b/gui/src/renderer/components/Connect.tsx
@@ -3,7 +3,7 @@ import { Component, Styles, View } from 'reactxp';
import { links } from '../../config.json';
import { ITunnelEndpoint, parseSocketAddress } from '../../shared/daemon-rpc-types';
import AccountExpiry from '../lib/account-expiry';
-import { AuthFailureError, AuthFailureKind } from '../lib/auth-failure';
+import { AuthFailureKind, parseAuthFailure } from '../lib/auth-failure';
import { IConnectionReduxState } from '../redux/connection/reducers';
import { IVersionReduxState } from '../redux/version/reducers';
import ExpiredAccountErrorView, { RecoveryAction } from './ExpiredAccountErrorView';
diff --git a/gui/src/renderer/components/NotificationArea.tsx b/gui/src/renderer/components/NotificationArea.tsx
index 8d831bf3c3..033067df8a 100644
--- a/gui/src/renderer/components/NotificationArea.tsx
+++ b/gui/src/renderer/components/NotificationArea.tsx
@@ -16,7 +16,7 @@ import {
import { BlockReason, TunnelStateTransition } from '../../shared/daemon-rpc-types';
import AccountExpiry from '../lib/account-expiry';
-import { AuthFailureError } from '../lib/auth-failure';
+import { parseAuthFailure } from '../lib/auth-failure';
import { IVersionReduxState } from '../redux/version/reducers';
interface IProps {
@@ -43,7 +43,7 @@ type State = NotificationAreaPresentation & {
function getBlockReasonMessage(blockReason: BlockReason): string {
switch (blockReason.reason) {
case 'auth_failed':
- return new AuthFailureError(blockReason.details).message;
+ return parseAuthFailure(blockReason.details).message;
case 'ipv6_unavailable':
return pgettext(
'in-app-notifications',