Error views

Implements JSON error views.