aboutsummaryrefslogtreecommitdiff
path: root/Timeline/ClientApp/src/app/http/timeline.ts
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-08-08 22:51:01 +0800
committercrupest <crupest@outlook.com>2020-08-08 22:51:01 +0800
commit282c28754a7225fb7f53aa7dfb7598fd54d2db88 (patch)
tree6326e2482fb1a6480e13daa584bae44e71e458b5 /Timeline/ClientApp/src/app/http/timeline.ts
parent6d5a9ba1c220a899aa239521e0ba699419583595 (diff)
downloadtimeline-282c28754a7225fb7f53aa7dfb7598fd54d2db88.tar.gz
timeline-282c28754a7225fb7f53aa7dfb7598fd54d2db88.tar.bz2
timeline-282c28754a7225fb7f53aa7dfb7598fd54d2db88.zip
Fix bugs.
Diffstat (limited to 'Timeline/ClientApp/src/app/http/timeline.ts')
-rw-r--r--Timeline/ClientApp/src/app/http/timeline.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/Timeline/ClientApp/src/app/http/timeline.ts b/Timeline/ClientApp/src/app/http/timeline.ts
index 0b219787..d8f0b49c 100644
--- a/Timeline/ClientApp/src/app/http/timeline.ts
+++ b/Timeline/ClientApp/src/app/http/timeline.ts
@@ -10,8 +10,9 @@ import {
convertToIfErrorCodeIs,
BlobWithEtag,
NotModified,
- convertToBlobWithEtagOrNotModified,
+ convertToNotModified,
convertToForbiddenError,
+ convertToBlobWithEtag,
} from './common';
import { HttpUser } from './user';
@@ -476,7 +477,8 @@ export class HttpTimelineClient implements IHttpTimelineClient {
responseType: 'blob',
headers,
})
- .then(convertToBlobWithEtagOrNotModified)
+ .then(convertToBlobWithEtag)
+ .catch(convertToNotModified)
.catch(convertToIfStatusCodeIs(404, HttpTimelinePostNotExistError))
.catch(convertToNetworkError);
}