# Output REST Service Returns HTML instead of JSON

**URL:** <https://xmlforum.companieshouse.gov.uk/t/output-rest-service-returns-html-instead-of-json/260>\
**Category:** Uncategorized\
**Created:** [October 7, 2016, 2:56pm UTC](https://xmlforum.companieshouse.gov.uk/t/output-rest-service-returns-html-instead-of-json/260 "2016-10-07T14:56:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cowiz](https://xmlforum.companieshouse.gov.uk/user_avatar/xmlforum.companieshouse.gov.uk/cowiz/32/43_2.png) [@cowiz](https://xmlforum.companieshouse.gov.uk/u/cowiz)\
**Post date:** [October 7, 2016, 2:56pm UTC](https://xmlforum.companieshouse.gov.uk/t/output-rest-service-returns-html-instead-of-json/260/1 "2016-10-07T14:56:32Z")

</div>

Not sure if this is the right place but we’ve noticed a few transient errors with the CH REST service recently. Can you please ensure errors are returned in JSON rather than HTML?

Any REST service should be consistent in the data type it’s returning in the response body.

![](https://xmlforum.companieshouse.gov.uk/uploads/default/original/1X/ab69136c533d137aade3196921bdc59b036890fd.png)

---

<div class="post-metadata">

**Author:** ![snicholas](https://xmlforum.companieshouse.gov.uk/user_avatar/xmlforum.companieshouse.gov.uk/snicholas/32/81_2.png) [@snicholas](https://xmlforum.companieshouse.gov.uk/u/snicholas)\
**Post date:** [October 12, 2016, 10:24am UTC](https://xmlforum.companieshouse.gov.uk/t/output-rest-service-returns-html-instead-of-json/260/2 "2016-10-12T10:24:33Z")

</div>

Good morning,

Can I ask if you are still having these issues? I ask this as there was an issue, but as far as I was aware it had now been resolved.

SDN

---

<div class="post-metadata">

**Author:** ![cowiz](https://xmlforum.companieshouse.gov.uk/user_avatar/xmlforum.companieshouse.gov.uk/cowiz/32/43_2.png) [@cowiz](https://xmlforum.companieshouse.gov.uk/u/cowiz)\
**Post date:** [October 12, 2016, 10:38am UTC](https://xmlforum.companieshouse.gov.uk/t/output-rest-service-returns-html-instead-of-json/260/3 "2016-10-12T10:38:04Z")

</div>

Hi Simon,

No issues right now, although we have experienced fairly frequent outages over the last 2 months, typically every few days and lasting ~10 mins. The outages are not ideal but we can work around them, the problem is more down to the invalid response the REST service returns when there’s an issue.
