File tree Expand file tree Collapse file tree 6 files changed +18
-18
lines changed Expand file tree Collapse file tree 6 files changed +18
-18
lines changed Original file line number Diff line number Diff line change @@ -54,13 +54,13 @@ export const getTweetInfo = async (
54
54
} ,
55
55
} ;
56
56
}
57
- const text = await res . json ( ) ;
57
+ const text = await res . text ( ) ;
58
58
const value = tryToErrorLike ( text ) ;
59
59
if ( ! value ) {
60
60
throw new UnexpectedResponseError ( {
61
61
path : new URL ( path ) ,
62
62
...res ,
63
- body : await res . text ( ) ,
63
+ body : text ,
64
64
} ) ;
65
65
}
66
66
return {
Original file line number Diff line number Diff line change @@ -53,13 +53,13 @@ export const getWebPageTitle = async (
53
53
} ,
54
54
} ;
55
55
}
56
- const text = await res . json ( ) ;
56
+ const text = await res . text ( ) ;
57
57
const value = tryToErrorLike ( text ) ;
58
58
if ( ! value ) {
59
59
throw new UnexpectedResponseError ( {
60
60
path : new URL ( path ) ,
61
61
...res ,
62
- body : await res . text ( ) ,
62
+ body : text ,
63
63
} ) ;
64
64
}
65
65
return {
Original file line number Diff line number Diff line change @@ -51,13 +51,13 @@ export const importPages = async (
51
51
) ;
52
52
53
53
if ( ! res . ok ) {
54
- const text = await res . json ( ) ;
54
+ const text = await res . text ( ) ;
55
55
const value = tryToErrorLike ( text ) ;
56
56
if ( ! value ) {
57
57
throw new UnexpectedResponseError ( {
58
58
path : new URL ( path ) ,
59
59
...res ,
60
- body : await res . text ( ) ,
60
+ body : text ,
61
61
} ) ;
62
62
}
63
63
return { ok : false , value } ;
@@ -94,13 +94,13 @@ export const exportPages = async <withMetadata extends true | false>(
94
94
) ;
95
95
96
96
if ( ! res . ok ) {
97
- const text = await res . json ( ) ;
97
+ const text = await res . text ( ) ;
98
98
const value = tryToErrorLike ( text ) ;
99
99
if ( ! value ) {
100
100
throw new UnexpectedResponseError ( {
101
101
path : new URL ( path ) ,
102
102
...res ,
103
- body : await res . text ( ) ,
103
+ body : text ,
104
104
} ) ;
105
105
}
106
106
return {
Original file line number Diff line number Diff line change @@ -32,13 +32,13 @@ export const getProject = async (
32
32
) ;
33
33
34
34
if ( ! res . ok ) {
35
- const text = await res . json ( ) ;
35
+ const text = await res . text ( ) ;
36
36
const value = tryToErrorLike ( text ) ;
37
37
if ( ! value ) {
38
38
throw new UnexpectedResponseError ( {
39
39
path : new URL ( path ) ,
40
40
...res ,
41
- body : await res . text ( ) ,
41
+ body : text ,
42
42
} ) ;
43
43
}
44
44
return {
Original file line number Diff line number Diff line change @@ -47,13 +47,13 @@ export const replaceLinks = async (
47
47
) ;
48
48
49
49
if ( ! res . ok ) {
50
- const text = await res . json ( ) ;
50
+ const text = await res . text ( ) ;
51
51
const value = tryToErrorLike ( text ) ;
52
52
if ( ! value ) {
53
53
throw new UnexpectedResponseError ( {
54
54
path : new URL ( path ) ,
55
55
...res ,
56
- body : await res . text ( ) ,
56
+ body : text ,
57
57
} ) ;
58
58
}
59
59
return {
Original file line number Diff line number Diff line change @@ -47,13 +47,13 @@ export const searchForPages = async (
47
47
} ,
48
48
} ;
49
49
}
50
- const text = await res . json ( ) ;
50
+ const text = await res . text ( ) ;
51
51
const value = tryToErrorLike ( text ) ;
52
52
if ( ! value ) {
53
53
throw new UnexpectedResponseError ( {
54
54
path : new URL ( path ) ,
55
55
...res ,
56
- body : await res . text ( ) ,
56
+ body : text ,
57
57
} ) ;
58
58
}
59
59
return {
@@ -100,13 +100,13 @@ export const searchForJoinedProjects = async (
100
100
} ,
101
101
} ;
102
102
}
103
- const text = await res . json ( ) ;
103
+ const text = await res . text ( ) ;
104
104
const value = tryToErrorLike ( text ) ;
105
105
if ( ! value ) {
106
106
throw new UnexpectedResponseError ( {
107
107
path : new URL ( path ) ,
108
108
...res ,
109
- body : await res . text ( ) ,
109
+ body : text ,
110
110
} ) ;
111
111
}
112
112
return { ok : false , value : value as NotLoggedInError } ;
@@ -162,13 +162,13 @@ export const searchForWatchList = async (
162
162
} ,
163
163
} ;
164
164
}
165
- const text = await res . json ( ) ;
165
+ const text = await res . text ( ) ;
166
166
const value = tryToErrorLike ( text ) ;
167
167
if ( ! value ) {
168
168
throw new UnexpectedResponseError ( {
169
169
path : new URL ( path ) ,
170
170
...res ,
171
- body : await res . text ( ) ,
171
+ body : text ,
172
172
} ) ;
173
173
}
174
174
return { ok : false , value : value as NotLoggedInError } ;
You can’t perform that action at this time.
0 commit comments