diff options
| author | Jeff Halter <868228+jhalter@users.noreply.github.com> | 2024-06-17 13:50:28 -0700 |
|---|---|---|
| committer | Jeff Halter <868228+jhalter@users.noreply.github.com> | 2024-06-17 13:50:28 -0700 |
| commit | 45ca5d60383cbe270624c713b916da29af7ba88f (patch) | |
| tree | a6f8b9ecf24837e8588390ae5bdf5fdef711fed9 /hotline/transaction_handlers.go | |
| parent | 5954ccad9c87063231f3a8bb3e5d01675a9865ca (diff) | |
Fix io.Reader implementations and wrap more errors
Diffstat (limited to 'hotline/transaction_handlers.go')
| -rw-r--r-- | hotline/transaction_handlers.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hotline/transaction_handlers.go b/hotline/transaction_handlers.go index 2d4eabd..20b87e2 100644 --- a/hotline/transaction_handlers.go +++ b/hotline/transaction_handlers.go @@ -1763,13 +1763,13 @@ func HandleGetFileNameList(cc *ClientConn, t *Transaction) (res []Transaction, e nil, ) if err != nil { - return res, err + return res, fmt.Errorf("error reading file path: %w", err) } var fp FilePath if t.GetField(FieldFilePath).Data != nil { if _, err = fp.Write(t.GetField(FieldFilePath).Data); err != nil { - return res, err + return res, fmt.Errorf("error writing file path: %w", err) } } @@ -1781,7 +1781,7 @@ func HandleGetFileNameList(cc *ClientConn, t *Transaction) (res []Transaction, e fileNames, err := getFileNameList(fullPath, cc.Server.Config.IgnoreFiles) if err != nil { - return res, err + return res, fmt.Errorf("getFileNameList: %w", err) } res = append(res, cc.NewReply(t, fileNames...)) |