aboutsummaryrefslogtreecommitdiff
path: root/FrontEnd/src/app/http/token.ts
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-02-13 11:58:36 +0800
committercrupest <crupest@outlook.com>2021-02-13 11:58:36 +0800
commit6159c8fd8e4d9ded22b9d5dd1772b1529a1d513a (patch)
tree7ae2fd68896dcd426dd6bb5183680ac226f468cf /FrontEnd/src/app/http/token.ts
parent99d525560f6aefa5f5fb63e3ba2fff3b557d61f6 (diff)
downloadtimeline-6159c8fd8e4d9ded22b9d5dd1772b1529a1d513a.tar.gz
timeline-6159c8fd8e4d9ded22b9d5dd1772b1529a1d513a.tar.bz2
timeline-6159c8fd8e4d9ded22b9d5dd1772b1529a1d513a.zip
...
Diffstat (limited to 'FrontEnd/src/app/http/token.ts')
-rw-r--r--FrontEnd/src/app/http/token.ts7
1 files changed, 2 insertions, 5 deletions
diff --git a/FrontEnd/src/app/http/token.ts b/FrontEnd/src/app/http/token.ts
index c0644515..f8b09d63 100644
--- a/FrontEnd/src/app/http/token.ts
+++ b/FrontEnd/src/app/http/token.ts
@@ -4,7 +4,6 @@ import axios, { AxiosError } from "axios";
import {
apiBaseUrl,
- convertToNetworkError,
convertToIfErrorCodeIs,
extractResponseData,
} from "./common";
@@ -47,15 +46,13 @@ export class HttpTokenClient implements IHttpTokenClient {
.then(extractResponseData)
.catch(
convertToIfErrorCodeIs(11010101, HttpCreateTokenBadCredentialError)
- )
- .catch(convertToNetworkError);
+ );
}
verify(req: HttpVerifyTokenRequest): Promise<HttpVerifyTokenResponse> {
return axios
.post<HttpVerifyTokenResponse>(`${apiBaseUrl}/token/verify`, req)
- .then(extractResponseData)
- .catch(convertToNetworkError);
+ .then(extractResponseData);
}
}