diff options
Diffstat (limited to 'src/state')
-rw-r--r-- | src/state/models/feed-view.ts | 7 | ||||
-rw-r--r-- | src/state/models/notifications-view.ts | 3 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/state/models/feed-view.ts b/src/state/models/feed-view.ts index 905f7af7e..1c58a44d3 100644 --- a/src/state/models/feed-view.ts +++ b/src/state/models/feed-view.ts @@ -3,6 +3,7 @@ import * as GetTimeline from '../../third-party/api/src/client/types/app/bsky/fe import * as GetAuthorFeed from '../../third-party/api/src/client/types/app/bsky/feed/getAuthorFeed' import {RootStoreModel} from './root-store' import * as apilib from '../lib/api' +import {cleanError} from '../../view/lib/strings' export class FeedItemMyStateModel { repost?: string @@ -254,7 +255,7 @@ export class FeedModel { this.isLoading = false this.isRefreshing = false this.hasLoaded = true - this.error = err + this.error = cleanError(err) } // loader functions @@ -282,7 +283,7 @@ export class FeedModel { this._replaceAll(res) this._xIdle() } catch (e: any) { - this._xIdle(`Failed to load feed: ${e.toString()}`) + this._xIdle(e.toString()) } } @@ -293,7 +294,7 @@ export class FeedModel { this._prependAll(res) this._xIdle() } catch (e: any) { - this._xIdle(`Failed to load feed: ${e.toString()}`) + this._xIdle(e.toString()) } } diff --git a/src/state/models/notifications-view.ts b/src/state/models/notifications-view.ts index 72cc17f6b..3a91eb322 100644 --- a/src/state/models/notifications-view.ts +++ b/src/state/models/notifications-view.ts @@ -4,6 +4,7 @@ import {RootStoreModel} from './root-store' import {Declaration} from './_common' import {hasProp} from '../lib/type-guards' import {APP_BSKY_GRAPH} from '../../third-party/api' +import {cleanError} from '../../view/lib/strings' const UNGROUPABLE_REASONS = ['trend', 'assertion'] @@ -215,7 +216,7 @@ export class NotificationsViewModel { this.isLoading = false this.isRefreshing = false this.hasLoaded = true - this.error = err + this.error = cleanError(err) } // loader functions |