fixing json views, adding shared error message helper