[Developers] minor change in search api behavior (empty result set will no longer be an error)
brendan
brendan at metaweb.com
Thu Jul 17 01:30:24 UTC 2008
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freebase.com/pipermail/developers/attachments/20080716/c14973a9/attachment.htm
More information about the Developers
mailing list