···2020 const { sessionInfo, socket } = findChannelSession(channel);
21212222 useEffect(() => {
2323- if (!sessionInfo)
2424- throw new Error(
2323+ if (!sessionInfo) {
2424+ console.warn(
2525 "Channel did not resolve to a valid sessionInfo object.",
2626 );
2727- if (!socket)
2828- throw new Error(
2727+ return;
2828+ }
2929+ if (!socket) {
3030+ console.warn(
2931 "Session info did not resolve to a valid websocket connection. This should not happen and is likely a bug. Check the sessions map object.",
3032 );
3333+ return;
3434+ }
31353236 // attach handlers here
3337···117121 };
118122 }, [socket, sessionInfo, channel]);
119123120120- if (!oAuthSession) throw new Error("No OAuth session");
121121- if (!sessionInfo)
122122- throw new Error(
124124+ if (!oAuthSession) {console.warn("No OAuth session"); return }
125125+ if (!sessionInfo) {
126126+ console.warn(
123127 "Channel did not resolve to a valid sessionInfo object.",
124128 );
125125- if (!socket)
126126- throw new Error(
129129+ return;
130130+ }
131131+ if (!socket) {
132132+ console.warn(
127133 "Session info did not resolve to a valid websocket connection. This should not happen and is likely a bug. Check the sessions map object.",
128134 );
135135+ return;
136136+ }
129137130138 const channelStringified = atUriToString(channel);
131139
+1-3
src/providers/authed/SessionsProvider.tsx
···98989999 console.log("tried to find", channel);
100100 if (!sessionInfo)
101101- throw new Error(
102102- "Provided channel at:// URI (object) could not be found in any existing lattice sessions",
103103- );
101101+ return { sessionInfo: undefined, socket: undefined };
104102105103 return { sessionInfo, socket: sessionsMap.get(sessionInfo) };
106104 },