diff options
Diffstat (limited to 'src/rhimportd/ctrlWatchDir.go')
-rw-r--r-- | src/rhimportd/ctrlWatchDir.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rhimportd/ctrlWatchDir.go b/src/rhimportd/ctrlWatchDir.go index 7b185c0..2335c8f 100644 --- a/src/rhimportd/ctrlWatchDir.go +++ b/src/rhimportd/ctrlWatchDir.go @@ -149,10 +149,14 @@ func watchDirHandler(conf *rhimport.Config, db *rddb.DBChan, ctx *rhimport.Conte return } - if err = rhimport.NormalizeFile(ctx); err != nil { + if res, err = rhimport.NormalizeFile(ctx); err != nil { watchDirErrorResponse(filename, http.StatusInternalServerError, err.Error(), "") return } + if res.ResponseCode != http.StatusOK { + watchDirErrorResponse(filename, res.ResponseCode, res.ErrorString, "") + return + } if res, err = rhimport.ImportFile(ctx); err != nil { watchDirErrorResponse(filename, http.StatusInternalServerError, err.Error(), res.SourceFile) |