# Null data throws error

**URL:** <http://forum.companieshouse.gov.uk/t/null-data-throws-error/283>\
**Category:** API Issues\
**Created:** [September 23, 2015, 1:45pm UTC](http://forum.companieshouse.gov.uk/t/null-data-throws-error/283 "2015-09-23T13:45:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mark](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/m/e9c0ed/32.png) [@mark](http://forum.companieshouse.gov.uk/u/mark)\
**Post date:** [September 23, 2015, 1:45pm UTC](http://forum.companieshouse.gov.uk/t/null-data-throws-error/283/1 "2015-09-23T13:45:54Z")

</div>

I’ve noticed that when I use the API to try and retrieve filing data for a company that doesn’t have any (eg, [https://beta.companieshouse.gov.uk/company/09227511](https://beta.companieshouse.gov.uk/company/09227511)), I get a 500 or 502 http error from the server.

While I can, obviously, handle this locally, this seems to be less than optimal as it means overriding my standard http error handling code. Surely, the server should still respond with http status 200, but the json should be either null or have a “zero results” field.
