Search currently returns the type for a result, but does not include a union with an error type.
For example, if search is called with an empty query string, the return type is:
{
"error" : {
"status" : 400,
"message" : "No search query"
}
}
But this is not represented in the possible return types from running search() and should be added