aboutsummaryrefslogtreecommitdiff
path: root/Timeline/ClientApp/src/app/http/timeline.ts
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-08-07 23:51:29 +0800
committercrupest <crupest@outlook.com>2020-08-07 23:51:29 +0800
commite0051ef2330f56ff13ca57b7c01059cf4365493e (patch)
treee6a41dac9ad481fe192b58e676f927cde74207ab /Timeline/ClientApp/src/app/http/timeline.ts
parent639c3e4456247f070179971f0ae426431b4da467 (diff)
downloadtimeline-e0051ef2330f56ff13ca57b7c01059cf4365493e.tar.gz
timeline-e0051ef2330f56ff13ca57b7c01059cf4365493e.tar.bz2
timeline-e0051ef2330f56ff13ca57b7c01059cf4365493e.zip
...
Diffstat (limited to 'Timeline/ClientApp/src/app/http/timeline.ts')
-rw-r--r--Timeline/ClientApp/src/app/http/timeline.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/Timeline/ClientApp/src/app/http/timeline.ts b/Timeline/ClientApp/src/app/http/timeline.ts
index bfe0d1ad..0b219787 100644
--- a/Timeline/ClientApp/src/app/http/timeline.ts
+++ b/Timeline/ClientApp/src/app/http/timeline.ts
@@ -11,6 +11,7 @@ import {
BlobWithEtag,
NotModified,
convertToBlobWithEtagOrNotModified,
+ convertToForbiddenError,
} from './common';
import { HttpUser } from './user';
@@ -441,6 +442,8 @@ export class HttpTimelineClient implements IHttpTimelineClient {
return axios
.get<RawTimelineGenericPostInfo[]>(url)
.then(extractResponseData)
+ .catch(convertToIfStatusCodeIs(404, HttpTimelineNotExistError))
+ .catch(convertToForbiddenError)
.catch(convertToNetworkError)
.then((rawPosts) =>
rawPosts.map((raw) => processRawTimelinePostInfo(raw))