diff options
Diffstat (limited to 'src/rhimportd/ctrlWebSimple.go')
-rw-r--r-- | src/rhimportd/ctrlWebSimple.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rhimportd/ctrlWebSimple.go b/src/rhimportd/ctrlWebSimple.go index e690571..a44bc0f 100644 --- a/src/rhimportd/ctrlWebSimple.go +++ b/src/rhimportd/ctrlWebSimple.go @@ -147,10 +147,14 @@ func webSimpleHandler(conf *rhimport.Config, db *rddb.DBChan, sessions *rhimport return } - if err = rhimport.NormalizeFile(ctx); err != nil { + if res, err = rhimport.NormalizeFile(ctx); err != nil { webSimpleErrorResponse(w, http.StatusInternalServerError, err.Error()) return } + if res.ResponseCode != http.StatusOK { + webSimpleErrorResponse(w, res.ResponseCode, res.ErrorString) + return + } if res, err = rhimport.ImportFile(ctx); err != nil { webSimpleErrorResponse(w, http.StatusInternalServerError, err.Error()) |