diff --git a/quesma/ingest/processor.go b/quesma/ingest/processor.go index 1b789de89..249df4727 100644 --- a/quesma/ingest/processor.go +++ b/quesma/ingest/processor.go @@ -672,6 +672,9 @@ func (ip *IngestProcessor) processInsertQuery(ctx context.Context, } else if !table.Created { createTableCmd = table.CreateTableString() } + if table == nil { + return nil, fmt.Errorf("table %s not found", tableName) + } tableConfig = table.Config var jsonsReadyForInsertion []string var alterCmd []string