Make error page nice

This stops the error page from being a blank white screen, and also logs qiita_pet errors to our qiita logger for later handling.
Odd, I don't know how that if statement got there. Anyway, fixed. Still good to look into an upgrade since 3.2 does have some really nice bugfixes/features.