update errors module import
raise BadRecord exception if json cannot be converted into record