[Developers] minor change in search api behavior (empty result setwill no longer be an error)

Arthur van Hoff AVH at zing.net
Thu Jul 17 01:33:13 UTC 2008


Great idea.

 

From: developers-bounces at freebase.com
[mailto:developers-bounces at freebase.com] On Behalf Of brendan
Sent: Wednesday, July 16, 2008 6:30 PM
To: For discussions about MQL\, Freebase API and apps built on Freebase
Subject: [Developers] minor change in search api behavior (empty result
setwill no longer be an error)

 

Hi all,

 

This change is no likely to affect any apps/scripts out there, but here
goes:

 

Currently, if you make a search request and the service finds nothing,
it comes back as an error.  e.g.:

 

http://freebase.com/api/service/search?prefix=insx&type=/music/artist&ty
pe_strict=all 


{
"status": "200 OK",
"code": "/api/status/error",
"messages": [
 {
   "message": "No search results found",
   "code": "/api/status/error/search/empty"
 }
],
"result": []
}

 

In the coming weeks this will change.  The expected response for an
empty result will be:

 

{ 
  "status": "200 OK", 
  "code": "/api/status/ok", 
  "messages": [ 
    { 
      "message": "No search results found" 
    } 
  ], 
  "result": [] 
}

 

This response just seems more sensible, particularly given that the
service allows the user to request a very constrained result (strict=all
means results must match the given type parameter value)

 

If your code has error handling for this "no results" case, you might
want to make sure this change won't break things.

 

Let me know if you have any questions/concerns.

 

Brendan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freebase.com/pipermail/developers/attachments/20080716/4cf5940c/attachment-0001.htm 


More information about the Developers mailing list