Custom taxonomy – query returns an error

Resetting permalinks, as per this thread, fixed this problem.

Visit Settings -> Permalinks -> Save current settings