From 8c133f77b7dce27cceec7c9a909ed3f2eda1eb95 Mon Sep 17 00:00:00 2001 From: Valentin Kuznetsov Date: Fri, 1 Mar 2024 09:03:09 -0500 Subject: [PATCH] fix message --- hubutils.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hubutils.go b/hubutils.go index bef340a..dfdc88a 100644 --- a/hubutils.go +++ b/hubutils.go @@ -348,7 +348,10 @@ func modelRecord(rec Record) (Record, error) { } // we should have only one record from MetaData if len(records) != 1 { - msg := fmt.Sprintf("Incorrect number of MetaData records %+v", records) + msg := fmt.Sprintf("Ambiguous request, ML records %+v", records) + if len(records) == 0 { + msg = fmt.Sprintf("No ML records found for your request") + } return rec, errors.New(msg) } record = records[0]