Error page handling

First draft of the Error pages handling (related to #137)