changed check_for_errors to handle the response from updateRelatedRecords