JSON calls only on non-error pages