# ransportException: Expecting JSON data but response content-type is application/octet-stream (Elastic Cloud 8.12)

**URL:** <https://discuss.elastic.co/t/ransportexception-expecting-json-data-but-response-content-type-is-application-octet-stream-elastic-cloud-8-12/375323>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [March 3, 2025, 6:26pm UTC](https://discuss.elastic.co/t/ransportexception-expecting-json-data-but-response-content-type-is-application-octet-stream-elastic-cloud-8-12/375323 "2025-03-03T18:26:31Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ltrotta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ltrotta/32/124003_2.png) [@ltrotta](https://discuss.elastic.co/u/ltrotta)\
**Post date:** [March 4, 2025, 8:22am UTC](https://discuss.elastic.co/t/ransportexception-expecting-json-data-but-response-content-type-is-application-octet-stream-elastic-cloud-8-12/375323/2 "2025-03-04T08:22:23Z")

</div>

Hello and welcome!  
Considering I'm not familiar with Spring Data, I think it's unlikely that an endpoint such as `index` is returning non json data, so my best bet here is that the url used to connect to the elasticsearch instance is wrong, and it's returning some non json error that the client cannot parse. Could you make sure you're using the correct url? You can try following [the AWS guide](https://www.elastic.co/blog/getting-started-with-elastic-cloud-on-amazon-web-services-aws), and if there's nothing new there then there's a [similar solved discussion](https://discuss.elastic.co/t/simple-wheres-the-url-to-query-elastic-cloud-instance/338318).

---

_[View the full topic](https://discuss.elastic.co/t/ransportexception-expecting-json-data-but-response-content-type-is-application-octet-stream-elastic-cloud-8-12/375323)._
