diff options
author | crupest <crupest@outlook.com> | 2020-08-08 22:51:01 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-08-08 22:51:01 +0800 |
commit | 63920dcf97ef19d036fa364e54be15193c5a8239 (patch) | |
tree | 27d0de2411c8a089895a608f4dc395da96d30ed5 /Timeline/ClientApp/src/app/http/timeline.ts | |
parent | 1eb0fe83a57834348d51639ac840850e380ca81f (diff) | |
download | timeline-63920dcf97ef19d036fa364e54be15193c5a8239.tar.gz timeline-63920dcf97ef19d036fa364e54be15193c5a8239.tar.bz2 timeline-63920dcf97ef19d036fa364e54be15193c5a8239.zip |
Fix bugs.
Diffstat (limited to 'Timeline/ClientApp/src/app/http/timeline.ts')
-rw-r--r-- | Timeline/ClientApp/src/app/http/timeline.ts | 6 |
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);
}
|