Jump to content
Sign in to follow this  
marc

ListNewsHeadlinesWithSource API returning an error for source "mni" and category "ALL"

Recommended Posts

I seem to be getting an error when I call the ListNewsHeadlinesWithSource API for the Market News International (mni) source with category set to “ALL”. Strangely the same API works for the 2 other sources available (dj / ci).

The error is get back from the API is:

{“ErrorCode”:10000,“ErrorMessage”:“An error has occurred.”,“HttpStatus”:500}

Could you please confirm whether this API is working as expected?

update (sky)

This issue seems to have popped back up..

GET /tradingapi/news/MNI/ALL?MaxResults=2 HTTP/1.1
Accept: text/plain, text/json, application/json
User-Agent: CIAPI.CS.8.0.0.0
UserName: XX658109
Session: 2974742f-03e7-4b8a-9cf3-b55eb07d4dde
Host: ciapi.cityindex.com
Accept-Encoding: gzip, deflate


HTTP/1.1 500 Internal Server Error
Cache-Control: no-cache
Pragma: no-cache
Content-Type: application/json; charset=utf-8
Expires: -1
Server: Microsoft-IIS/7.5
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Fri, 04 Jan 2013 15:12:40 GMT
Content-Length: 76

{"HttpStatus":500,"ErrorMessage":"An error has occurred.","ErrorCode":10000}

Share this post


Link to post
Guest mrdavidlaing

 

I seem to be getting an error when I call the ListNewsHeadlinesWithSource API for the Market News International (mni) source with category set to “ALL”. Strangely the same API works for the 2 other sources available (dj / ci).

The error is get back from the API is:

{“ErrorCode”:10000,“ErrorMessage”:“An error has occurred.”,“HttpStatus”:500}

Could you please confirm whether this API is working as expected?

update (sky)

This issue seems to have popped back up..

GET /tradingapi/news/MNI/ALL?MaxResults=2 HTTP/1.1
Accept: text/plain, text/json, application/json
User-Agent: CIAPI.CS.8.0.0.0
UserName: XX658109
Session: 2974742f-03e7-4b8a-9cf3-b55eb07d4dde
Host: ciapi.cityindex.com
Accept-Encoding: gzip, deflate


HTTP/1.1 500 Internal Server Error
Cache-Control: no-cache
Pragma: no-cache
Content-Type: application/json; charset=utf-8
Expires: -1
Server: Microsoft-IIS/7.5
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Fri, 04 Jan 2013 15:12:40 GMT
Content-Length: 76

{"HttpStatus":500,"ErrorMessage":"An error has occurred.","ErrorCode":10000}

Please could you include some sample code from https://ciapipreprod.cityindextest9.co.uk/tradingapi showing this error happening.

Share this post


Link to post

 

I seem to be getting an error when I call the ListNewsHeadlinesWithSource API for the Market News International (mni) source with category set to “ALL”. Strangely the same API works for the 2 other sources available (dj / ci).

The error is get back from the API is:

{“ErrorCode”:10000,“ErrorMessage”:“An error has occurred.”,“HttpStatus”:500}

Could you please confirm whether this API is working as expected?

update (sky)

This issue seems to have popped back up..

GET /tradingapi/news/MNI/ALL?MaxResults=2 HTTP/1.1
Accept: text/plain, text/json, application/json
User-Agent: CIAPI.CS.8.0.0.0
UserName: XX658109
Session: 2974742f-03e7-4b8a-9cf3-b55eb07d4dde
Host: ciapi.cityindex.com
Accept-Encoding: gzip, deflate


HTTP/1.1 500 Internal Server Error
Cache-Control: no-cache
Pragma: no-cache
Content-Type: application/json; charset=utf-8
Expires: -1
Server: Microsoft-IIS/7.5
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Fri, 04 Jan 2013 15:12:40 GMT
Content-Length: 76

{"HttpStatus":500,"ErrorMessage":"An error has occurred.","ErrorCode":10000}

Here is an example using the url as “/news/{source}/{category}?MaxResults={maxResults}” (cf. doc)

var userName = "CC735158";
doPost('/session',{ "UserName": userName, "Password": "password"}, function (data,     textCode) {
    setRequestHeader("UserName", userName);
    setRequestHeader("Session", data.Session);

    doGet('/news/dj/uk?MaxResults=2');
    doGet('/news/dj/aus?MaxResults=2');
    doGet('/news/ci/SEMINARSCHINA?MaxResults=2');
    doGet('/news/mni/ALL?MaxResults=2');
});

This shows 3 sets of news being returned. The last call returns {“ErrorCode”:10000,“ErrorMessage”:“An error has occurred.”,“HttpStatus”:500}

Share this post


Link to post
Guest mrdavidlaing

 

I seem to be getting an error when I call the ListNewsHeadlinesWithSource API for the Market News International (mni) source with category set to “ALL”. Strangely the same API works for the 2 other sources available (dj / ci).

The error is get back from the API is:

{“ErrorCode”:10000,“ErrorMessage”:“An error has occurred.”,“HttpStatus”:500}

Could you please confirm whether this API is working as expected?

update (sky)

This issue seems to have popped back up..

GET /tradingapi/news/MNI/ALL?MaxResults=2 HTTP/1.1
Accept: text/plain, text/json, application/json
User-Agent: CIAPI.CS.8.0.0.0
UserName: XX658109
Session: 2974742f-03e7-4b8a-9cf3-b55eb07d4dde
Host: ciapi.cityindex.com
Accept-Encoding: gzip, deflate


HTTP/1.1 500 Internal Server Error
Cache-Control: no-cache
Pragma: no-cache
Content-Type: application/json; charset=utf-8
Expires: -1
Server: Microsoft-IIS/7.5
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Fri, 04 Jan 2013 15:12:40 GMT
Content-Length: 76

{"HttpStatus":500,"ErrorMessage":"An error has occurred.","ErrorCode":10000}

@cram Thanks for that test case. It looks like the backend news service is throwing the following error:

APP37 - INFO  2011-12-23 21:42:31,222 2084 NewsGateway.NewsGatewayHost Couldn't map news source for request.

We’ll get you further info after the Christmas break

Share this post


Link to post
Guest sky.sanders

This is working as expected, that particular call is not production ready. There is an outstanding change request which will address this issue.

i have a test that indicates that this may still (or again) be an issue. I will follow up with a bug report.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×