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
F2089029: D11198.diff
Sun, Jun 23, 6:50 PM
Unknown Object (File)
Sat, Jun 15, 3:39 AM
Unknown Object (File)
Thu, Jun 13, 1:37 AM
Unknown Object (File)
Fri, Jun 7, 6:40 PM
Unknown Object (File)
Fri, Jun 7, 6:40 PM
Unknown Object (File)
Fri, Jun 7, 6:40 PM
Unknown Object (File)
Fri, Jun 7, 3:12 PM
Unknown Object (File)
Apr 20 2024, 2:53 PM
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.