Page MenuHomePhabricator

[web/native] Return null instead of throw new error when incomplete auth metadata
ClosedPublic

Authored by will on Feb 29 2024, 6:15 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 10, 9:24 AM
Unknown Object (File)
Thu, Oct 10, 9:24 AM
Unknown Object (File)
Sep 28 2024, 9:54 AM
Unknown Object (File)
Sep 16 2024, 2:01 PM
Unknown Object (File)
Sep 16 2024, 2:01 PM
Unknown Object (File)
Sep 16 2024, 1:57 PM
Unknown Object (File)
Sep 9 2024, 11:26 PM
Unknown Object (File)
Sep 7 2024, 2:18 AM
Subscribers

Details

Summary

This returns null when the auth metadata returned is incomplete (contains null values).

Context: https://linear.app/comm/issue/ENG-7083/getting-auth-metadata-is-incomplete-error-when-testing-on-web

Test Plan

no longer receive uncaught promise error on web

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ashoat published this revision for review.Feb 29 2024, 6:26 AM
ashoat accepted this revision.

Can you clarify what effects this will have downstream before landing?

Does user prefix search on identity work without auth metadata? How about exact match user search?

This revision is now accepted and ready to land.Feb 29 2024, 6:27 AM

Downstream the client will no longer attempt to initialize a websocket connection in the identity-search-context. The identitySearchSocketConnected variable in useSearchUsers will remain false and so the function will fallback to keyserver search.

Identity-based prefix search will not work but keyserver prefix search will work. We don't currently use identity-search for exact search either, so that won't be a problem.

varun added inline comments.
lib/utils/identity-search-utils.js
27 ↗(On Diff #37687)

can we add a comment explaining why we're returning null here for the time being?

will planned changes to this revision.Feb 29 2024, 8:48 AM
This revision was not accepted when it landed; it landed in state Changes Planned.Feb 29 2024, 9:23 AM
This revision was automatically updated to reflect the committed changes.