about summary refs log tree commit diff
path: root/src/state/models/post-thread-view.ts
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2022-12-14 16:03:10 -0600
committerPaul Frazee <pfrazee@gmail.com>2022-12-14 16:03:10 -0600
commitd0a437f8fb9939e220595b0d4ad2478f294fe8d2 (patch)
treed9d556acc1097d4ca7d8f9c70ec3abe7703647a5 /src/state/models/post-thread-view.ts
parent568ff92582cbd5751a994d12bc03f6a5ab5ae5ce (diff)
downloadvoidsky-d0a437f8fb9939e220595b0d4ad2478f294fe8d2.tar.zst
Improve handling of connection loss
Diffstat (limited to 'src/state/models/post-thread-view.ts')
-rw-r--r--src/state/models/post-thread-view.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/state/models/post-thread-view.ts b/src/state/models/post-thread-view.ts
index ea9d123d0..ebe5b730d 100644
--- a/src/state/models/post-thread-view.ts
+++ b/src/state/models/post-thread-view.ts
@@ -312,7 +312,11 @@ export class PostThreadViewModel {
   private async _resolveUri() {
     const urip = new AtUri(this.params.uri)
     if (!urip.host.startsWith('did:')) {
-      urip.host = await this.rootStore.resolveName(urip.host)
+      try {
+        urip.host = await this.rootStore.resolveName(urip.host)
+      } catch (e: any) {
+        this.error = e.toString()
+      }
     }
     runInAction(() => {
       this.resolvedUri = urip.toString()