diff --git a/src/plugins/console/public/application/hooks/use_send_current_request_to_es/send_request_to_es.ts b/src/plugins/console/public/application/hooks/use_send_current_request_to_es/send_request_to_es.ts index 94e184748908c..451198aaf2d2b 100644 --- a/src/plugins/console/public/application/hooks/use_send_current_request_to_es/send_request_to_es.ts +++ b/src/plugins/console/public/application/hooks/use_send_current_request_to_es/send_request_to_es.ts @@ -93,7 +93,7 @@ export function sendRequestToES(args: EsRequestArgs): Promise if (body instanceof ArrayBuffer) { value = body; } else { - value = JSON.stringify(body, null, 2); + value = typeof body === 'string' ? body : JSON.stringify(body, null, 2); } const warnings = response.headers.get('warning');