As per comments here.
Also, the SavedQueriesInterface I believe has its own version of the get_json/error_handling stuff for some reason, which could possibly be shared.
SavedQueriesInterface