Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3361727
D11221.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D11221.diff
View Options
diff --git a/lib/components/keyserver-connection-handler.js b/lib/components/keyserver-connection-handler.js
--- a/lib/components/keyserver-connection-handler.js
+++ b/lib/components/keyserver-connection-handler.js
@@ -10,7 +10,10 @@
useLogOut,
} from '../actions/user-actions.js';
import { extractKeyserverIDFromID } from '../keyserver-conn/keyserver-call-utils.js';
-import { setNewSession } from '../keyserver-conn/keyserver-conn-types.js';
+import {
+ setNewSession,
+ CANCELLED_ERROR,
+} from '../keyserver-conn/keyserver-conn-types.js';
import { resolveKeyserverSessionInvalidation } from '../keyserver-conn/recovery-utils.js';
import { filterThreadIDsInFilterList } from '../reducers/calendar-filters-reducer.js';
import {
@@ -42,7 +45,6 @@
};
const AUTH_RETRY_DELAY_MS = 60000;
-const CANCELLED_ERROR = 'cancelled';
function KeyserverConnectionHandler(props: Props) {
const { socketComponent: Socket, ...socketProps } = props;
diff --git a/lib/keyserver-conn/keyserver-conn-types.js b/lib/keyserver-conn/keyserver-conn-types.js
--- a/lib/keyserver-conn/keyserver-conn-types.js
+++ b/lib/keyserver-conn/keyserver-conn-types.js
@@ -33,8 +33,8 @@
startingPayload: LogInStartingPayload,
) => Promise<boolean>;
-const setNewSessionActionType = 'SET_NEW_SESSION';
-function setNewSession(
+export const setNewSessionActionType = 'SET_NEW_SESSION';
+export function setNewSession(
dispatch: Dispatch,
sessionChange: ClientSessionChange,
preRequestUserState: ?PreRequestUserState,
@@ -95,4 +95,6 @@
export const setActiveSessionRecoveryActionType = 'SET_ACTIVE_SESSION_RECOVERY';
-export { setNewSessionActionType, setNewSession };
+// We pass this string to the Error constructor when dispatching a _FAILED
+// action via throwing in the promise that we pass to dispatchActionPromise
+export const CANCELLED_ERROR = 'cancelled';
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 25, 7:03 PM (19 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2580748
Default Alt Text
D11221.diff (1 KB)
Attached To
Mode
D11221: [lib] Factor out CANCELLED_ERROR into keyserver-conn-types.js
Attached
Detach File
Event Timeline
Log In to Comment