// handleresponse takes the rethink response and turn it into something we can consume elsewhere
handleresponse takes the rethink response and turn it into something we can consume elsewhere
// handleresponse takes the rethink response and turn it into something we can consume elsewhere
func (r *Rethinkdb) handleResponse(resp *gorethink.WriteResponse) error {
	if resp.Errors != 0 {
		if !strings.Contains(resp.FirstError, "Duplicate primary key") { 
			if r.debug {
				fmt.Printf("Reported %d errors\n", resp.Errors)
			}
			return fmt.Errorf("%s\n%s", "problem inserting docs", resp.FirstError)
		}
	}
	return nil
}
func ( r * Rethinkdb ) handleResponse ( resp * gorethink . WriteResponse ) error { if resp . Errors != 0 { if ! strings . Contains ( resp . FirstError , " " ) { if r . debug { fmt . Printf ( " \n " , resp . Errors ) } return fmt . Errorf ( " \n " , " " , resp . FirstError ) } } return nil }
handleresponse takes the rethink response and turn it into something we can consume elsewhere
handleresponse takes the rethink response and turn it into something we can consume elsewhere
// we don't care about this error