internal/v4: fix search error handling

We use the new HandleJSON API which doesn't give a ResponseWriter
to use.