summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorJesse Hallam <jesse.hallam@gmail.com>2018-03-22 15:33:02 -0400
committerSaturnino Abril <saturnino.abril@gmail.com>2018-03-23 03:33:02 +0800
commit87762ae62eb887dfb3fd0957040919aede46f7d4 (patch)
treecd549e7582e2b4ee9912ec9027a8af9608bab75a /cmd
parentc9e9484150fcc05ca12388c6db8b831c41f227eb (diff)
downloadchat-87762ae62eb887dfb3fd0957040919aede46f7d4.tar.gz
chat-87762ae62eb887dfb3fd0957040919aede46f7d4.tar.bz2
chat-87762ae62eb887dfb3fd0957040919aede46f7d4.zip
Improved bulkload error handling (#8491)
* log the config file path used by the server on startup * return an err if the bulk import command fails * log the underlying errors that occur when importing The code assumed all errors meant a missing resource, but it's possible something else is at fault. Including the error helps pinpoint that more readily.
Diffstat (limited to 'cmd')
-rw-r--r--cmd/commands/import.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/cmd/commands/import.go b/cmd/commands/import.go
index 4058d175a..c572ec53a 100644
--- a/cmd/commands/import.go
+++ b/cmd/commands/import.go
@@ -130,6 +130,7 @@ func bulkImportCmdF(command *cobra.Command, args []string) error {
if lineNumber != 0 {
cmd.CommandPrettyPrintln(fmt.Sprintf("Error occurred on data file line %v", lineNumber))
}
+ return err
} else {
if apply {
cmd.CommandPrettyPrintln("Finished Bulk Import.")