Skip to content

Commit 459c0d5

Browse files
committed
modify error messages
1 parent 8d61593 commit 459c0d5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

internal/grpc/grpc.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ func retrieveTokenFromFile(path string) (string, error) {
265265
return "", errors.New("token file path is empty")
266266
}
267267

268-
slog.Debug("Reading dataplane key from file", "path", path)
268+
slog.Debug("Reading token from file", "path", path)
269269
var keyVal string
270270
keyBytes, err := os.ReadFile(path)
271271
if err != nil {
@@ -278,8 +278,7 @@ func retrieveTokenFromFile(path string) (string, error) {
278278
keyVal = string(keyBytes)
279279

280280
if keyVal == "" {
281-
slog.Error("failed to load token, please check agent configuration")
282-
return "", errors.New("failed to load token, please check agent configuration")
281+
return "", errors.New("failed to load token, token file is empty")
283282
}
284283

285284
return keyVal, nil

0 commit comments

Comments
 (0)