How to return [error] in a rest api build with view? I have a view which gives has an input:
email
key

The json returns a uid.

I would like to return [error] when the combination email + key is not found. Currently, it is only [].

How to do this?
If you are using Views, I would add a "no results behavior" that outputs the error message of your choice.