Forums » Feature Requests Search

Bring back Thing ID Errors, please? New Reply

Author Post
Posts: 90
Registered: Aug 29, 2008

Hi.

Since I putback some code in Remix that depends on a distinction in error codes that exists in API v2, I'm looking at APIv3 and really missing v2's error code 6: Missing thing ID and especially error code 7: Unknown Thing ID. Such cases collapse to v3's error code 4: Missing parameter and error code 5: Invalid parameter.

The messages do make some distinction, but I wouldn't want to move Remix to rely on unstructured text error messages. Would it be possible to shoehorn something like the old error code 7 into APIv3?

adam

Posts: 666
Registered: Sep 08, 2008

atl:

I want to make sure I understand the problem fully. The use case is you want to see check to see if an analysis has already been performed so you will try to get data from the the analysis using the ID. In V2, if the analysis had not been performed you would get an error code 7 'Unknown thing id". But in V3 you will get an error code 5 'invalid parameter' - but that may also be returned for other reasons (such as an ill-formed ID). You'd like the richer codes to help you distinguish between calls where the ID not a valid ID (or some other parameter is bad) and where the ID is valid but points to a thing that doesn't exist.

Is this correct?

Paul

Posts: 90
Registered: Aug 29, 2008

Paul,

Absolutely correct.

adam

Posts: 666
Registered: Sep 08, 2008

atl: That makes perfect sense to me, I'll open a ticket and see if we can get that changed.

Paul

Posts: 666
Registered: Sep 08, 2008

atl and other developers: how would you like a method called 'get_status' that would take an ID or an MD5 and return the status of the analysis: UNKNOWN, IN_PROCESS, ANALYSED.

Paul

Posts: 90
Registered: Aug 29, 2008

It's different, but it makes sense.

Reply to this Thread

You must log in to post a reply.