Currently, the general error view always returns an bdajax action response. Fix for regular JSON requests. Check for ajax forms.