Skip to content

Commit 75c0402

Browse files
committed
fix lint
1 parent 11dc81e commit 75c0402

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

kyuubi-server/web-ui/src/utils/request.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,14 @@ async function request(config: RequestConfig): Promise<unknown> {
7272
const contentType = response.headers.get('content-type') || ''
7373
const isJson = contentType.includes('application/json')
7474
const rawText = await response.text()
75-
const parsedBody = isJson && rawText ? JSON.parse(rawText) : rawText || undefined
75+
const parsedBody =
76+
isJson && rawText ? JSON.parse(rawText) : rawText || undefined
7677

7778
if (!response.ok) {
7879
const message =
79-
(parsedBody && typeof parsedBody === 'object' && (parsedBody as any).message) ||
80+
(parsedBody &&
81+
typeof parsedBody === 'object' &&
82+
(parsedBody as any).message) ||
8083
(typeof parsedBody === 'string' && parsedBody) ||
8184
`HTTP error! status: ${response.status}`
8285
const err: any = new Error(message)

0 commit comments

Comments
 (0)