return 204 if no data, but 500 if no db connection