You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -129,7 +131,7 @@ export function parseJsonArrayFromText(text: string) {
129
131
* @returns An object parsed from the JSON string if successful; otherwise, null or the result of parsing an array.
130
132
*/
131
133
exportfunctionparseJSONObjectFromText(
132
-
text: string
134
+
text: string,
133
135
): Record<string,any>|null{
134
136
letjsonData=null;
135
137
@@ -140,6 +142,7 @@ export function parseJSONObjectFromText(
140
142
jsonData=JSON.parse(jsonBlockMatch[1]);
141
143
}catch(e){
142
144
console.error("Error parsing JSON:",e);
145
+
console.error("Text is not JSON",text);
143
146
returnnull;
144
147
}
145
148
}else{
@@ -151,6 +154,7 @@ export function parseJSONObjectFromText(
151
154
jsonData=JSON.parse(objectMatch[0]);
152
155
}catch(e){
153
156
console.error("Error parsing JSON:",e);
157
+
console.error("Text is not JSON",text);
154
158
returnnull;
155
159
}
156
160
}
@@ -172,7 +176,7 @@ export function parseJSONObjectFromText(
172
176
exportconstpostActionResponseFooter=`Choose any combination of [LIKE], [RETWEET], [QUOTE], and [REPLY] that are appropriate. Each action must be on its own line. Your response must only include the chosen actions.`;
0 commit comments