Fix bug in 6-degree cookbook example

Throw exception when page not found