Fixed HTTP errors when user requested JSON errors