Skip to content

Commit 949a342

Browse files
committed
Standardize error message
1 parent 291c231 commit 949a342

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compute_parser.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ func ParseComputeString(ctx context.Context, compute string) (*GoDataComputeQuer
4646
if len(parts) != 2 {
4747
return nil, &GoDataError{
4848
ResponseCode: 400,
49-
Message: "Invalid $compute query format",
49+
Message: "Invalid $compute query option",
5050
}
5151
}
5252
field := strings.TrimSpace(parts[1])
5353
if !computeFieldRegex.MatchString(field) {
5454
return nil, &GoDataError{
5555
ResponseCode: 400,
56-
Message: "Invalid $compute field name",
56+
Message: "Invalid $compute query option",
5757
}
5858
}
5959

@@ -83,7 +83,7 @@ func ParseComputeString(ctx context.Context, compute string) (*GoDataComputeQuer
8383
if _, ok := fields[field]; ok {
8484
return nil, &GoDataError{
8585
ResponseCode: 400,
86-
Message: "Invalid $compute, duplicate field name",
86+
Message: "Invalid $compute query option",
8787
}
8888
}
8989

0 commit comments

Comments
 (0)