Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/bcd/ast/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ func (d *Default) ToParameters() ([]byte, error) {
}
return []byte(fmt.Sprintf(`{"int":%s}`, value)), nil
}
return nil, nil
return nil, errors.Wrapf(consts.ErrValidation, "missing value for parameter %s", d.GetName())
}

// Docs -
Expand Down
3 changes: 2 additions & 1 deletion internal/views/michelson_storage_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"context"
stdJSON "encoding/json"

"github.com/baking-bad/bcdhub/internal/bcd/consts"
"github.com/baking-bad/bcdhub/internal/models/contract"
"github.com/baking-bad/bcdhub/internal/noderpc"
"github.com/pkg/errors"
Expand Down Expand Up @@ -42,7 +43,7 @@ func NewMichelsonStorageView(impl contract.ViewImplementation, name string, stor

func validateJSONFragment(name string, data []byte) error {
if !stdJSON.Valid(data) {
return errors.Errorf("invalid michelson storage view: %s is not valid JSON", name)
return errors.Wrapf(consts.ErrValidation, "invalid michelson storage view: %s is not valid JSON", name)
}
return nil
}
Expand Down