I am using the following code to execute Swift code using Kitura against CouchDB.
database.queryByView("high-priority-tasks", ofDesign: "polls", usingParameters: [], callback: { (json: JSON?, error :NSError?) in
if error != nil {
try! response.status(.internalServerError).end()
}
response.send(json: json!)
})
In my CouchDB I have created the view:
I get the following error back:
po error?.localizedDescription!
▿ Optional<String>
- some : "Error: not_found, reason: missing"