BadRequestError: BadRequestError(400, 'media_type_header_exception', 'Invalid media-type value on headers [Accept, Content-Type]')

In data bricks , I have been elastic 9.0 for year now , but recently i got this error [BadRequestError: BadRequestError(400, 'media_type_header_exception', 'Invalid media-type value on headers [Accept, Content-Type]') ] , i don't know why am getting this error , when ever i try to create any index or update existing index am getting this error . but when i do same thing in my VM its working well . OS need some one help on this .

Yep thats a feature from 2 years ago to fix add default options... (bonus to turn-off instrumentation) :man_gesturing_ok:

RequestOptions.Builder restClientOptionsBuilder = RequestOptions.DEFAULT.toBuilder();

restClientOptionsBuilder
        .addHeader(HttpHeaders.CONTENT_TYPE, "application/json")
        .addHeader(HttpHeaders.ACCEPT, "application/json")
        .addHeader("X-Elastic-Product", "Elasticsearch");

RestClientOptions restClientOptions = new RestClientOptions.Builder(restClientOptionsBuilder).build();

transport = new RestClientTransport(restClient, new JacksonJsonpMapper(), restClientOptions, NoopInstrumentation.INSTANCE);