lib/popcorn: add `json_error` to return a Json formatted error