Skip to content

Commit b7f905c

Browse files
fix: move json parsing into format to avoid error on invalid json response (#840)
1 parent cada2b5 commit b7f905c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/dashboard/frontend/src/lib/utils/generate-response.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export const generateResponse = async (res: Response, startTime: number) => {
66
let data
77

88
if (contentType === 'application/json') {
9-
data = formatJSON(await res.json())
9+
data = formatJSON(await res.text())
1010
} else if (
1111
contentType?.startsWith('image/') ||
1212
contentType?.startsWith('video/') ||

0 commit comments

Comments
 (0)