File tree Expand file tree Collapse file tree
kyuubi-server/web-ui/src/utils Expand file tree Collapse file tree Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments