first commit
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package lexicomai
|
||||
|
||||
import "fmt"
|
||||
|
||||
// Доменные ошибки. Инструменты превращают их в errorResult (recoverable —
|
||||
// модель видит и может исправить), а не в Go-ошибку.
|
||||
|
||||
var (
|
||||
errProductRequired = fmt.Errorf("product is required")
|
||||
)
|
||||
|
||||
// UnknownProductError — модель запросила продукт вне поддерживаемого перечня.
|
||||
type UnknownProductError struct{ Name string }
|
||||
|
||||
func (e *UnknownProductError) Error() string {
|
||||
return fmt.Sprintf("unknown product %q (not in the supported company products)", e.Name)
|
||||
}
|
||||
Reference in New Issue
Block a user