Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3397277
D10665.id35727.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
946 B
Referenced Files
None
Subscribers
None
D10665.id35727.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
@@ -1,5 +1,6 @@
// @flow
+import invariant from 'invariant';
import * as React from 'react';
import { logOutActionTypes, useLogOut } from '../actions/user-actions.js';
@@ -35,6 +36,8 @@
const identityClient = React.useContext(
IdentityClientContext,
)?.identityClient;
+ invariant(identityClient, 'Identity client should be set');
+
React.useEffect(() => {
if (!usingCommServicesAccessToken) {
return;
@@ -42,7 +45,7 @@
void (async () => {
try {
- await identityClient?.getKeyserverKeys(keyserverID);
+ await identityClient.getKeyserverKeys(keyserverID);
} catch (e) {
console.log(
`Error getting keys for keyserver with id ${keyserverID}`,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Dec 2, 5:09 PM (19 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2608264
Default Alt Text
D10665.id35727.diff (946 B)
Attached To
Mode
D10665: [lib] Improve error handling in connection handler
Attached
Detach File
Event Timeline
Log In to Comment