Skip to content

Commit

Permalink
CNS-565: change error descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
oren-lava committed Aug 1, 2023
1 parent 1cf12b0 commit 28d5ae7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion x/pairing/keeper/staking.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (k Keeper) StakeNewEntry(ctx sdk.Context, creator string, chainID string, a
}

if !planstypes.IsValidGeoEnum(int32(geolocation)) {
return utils.LavaFormatWarning("can't register for no geolocation or geolocation outside zones", fmt.Errorf("invalid geolocation"),
return utils.LavaFormatWarning("missing or invalid geolocation", fmt.Errorf("staking failed"),
utils.Attribute{Key: "geolocation", Value: geolocation},
utils.Attribute{Key: "valid_geolocations", Value: planstypes.PrintGeolocations()},
)
Expand Down
2 changes: 1 addition & 1 deletion x/plans/types/policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ func parsePolicyEnumValue(enumType interface{}, strVal string) (interface{}, err
case uint64:
geo, err := ParseGeoEnum(strVal)
if err != nil {
return 0, fmt.Errorf("invalid geolocation %s. Valid geolocations: %s", strVal, PrintGeolocations())
return 0, fmt.Errorf("invalid geolocation %s", strVal)
}
return geo, nil
case SELECTED_PROVIDERS_MODE:
Expand Down

0 comments on commit 28d5ae7

Please sign in to comment.