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

brendan brendan at metaweb.com
Thu Jul 17 16:39:23 UTC 2008


credit goes to David Flanagan who is putting together our 2nd gen. mql  
and services docs which, I trust, are going to be awesome. His  
"JavaScript" book rests just to the left of my keyboard as I type  
this, thus my high expectations ;)

Brendan

On Jul 16, 2008, at 6:33 PM, Arthur van Hoff wrote:

> 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&type_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
> _______________________________________________
> Developers mailing list
> Developers at freebase.com
> http://lists.freebase.com/mailman/listinfo/developers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freebase.com/pipermail/developers/attachments/20080717/736fd3c9/attachment.htm 


More information about the Developers mailing list