diff options
Diffstat (limited to 'daemon/algod/api/server/v2/dryrun.go')
-rw-r--r-- | daemon/algod/api/server/v2/dryrun.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/daemon/algod/api/server/v2/dryrun.go b/daemon/algod/api/server/v2/dryrun.go index acf5fc94b..9c3355cd1 100644 --- a/daemon/algod/api/server/v2/dryrun.go +++ b/daemon/algod/api/server/v2/dryrun.go @@ -1,4 +1,4 @@ -// Copyright (C) 2019-2023 Algorand, Inc. +// Copyright (C) 2019-2024 Algorand, Inc. // This file is part of go-algorand // // go-algorand is free software: you can redistribute it and/or modify @@ -89,7 +89,12 @@ func (dr *DryrunRequest) ExpandSources() error { for i, s := range dr.Sources { ops, err := logic.AssembleString(s.Source) if err != nil { - return fmt.Errorf("dryrun Source[%d]: %v", i, err) + if len(ops.Errors) <= 1 { + return fmt.Errorf("dryrun Source[%d]: %w", i, err) + } + var sb strings.Builder + ops.ReportMultipleErrors("", &sb) + return fmt.Errorf("dryrun Source[%d]: %d errors\n%s", i, len(ops.Errors), sb.String()) } switch s.FieldName { case "lsig": |