summaryrefslogtreecommitdiff
path: root/rhimport/session.go
diff options
context:
space:
mode:
Diffstat (limited to 'rhimport/session.go')
-rw-r--r--rhimport/session.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/rhimport/session.go b/rhimport/session.go
index 66705ec..f61c8fe 100644
--- a/rhimport/session.go
+++ b/rhimport/session.go
@@ -100,12 +100,12 @@ func sessionProgressCallback(step int, stepName string, progress float64, userda
func sessionRun(ctx Context, done chan<- Result) {
if err := ctx.SanityCheck(); err != nil {
- done <- Result{http.StatusBadRequest, err.Error(), 0, 0}
+ done <- Result{ResponseCode: http.StatusBadRequest, ErrorString: err.Error()}
return
}
if res, err := FetchFile(&ctx); err != nil {
- done <- Result{http.StatusInternalServerError, err.Error(), 0, 0}
+ done <- Result{ResponseCode: http.StatusInternalServerError, ErrorString: err.Error()}
return
} else if res.ResponseCode != http.StatusOK {
done <- *res
@@ -113,7 +113,7 @@ func sessionRun(ctx Context, done chan<- Result) {
}
if res, err := ImportFile(&ctx); err != nil {
- done <- Result{http.StatusInternalServerError, err.Error(), 0, 0}
+ done <- Result{ResponseCode: http.StatusInternalServerError, ErrorString: err.Error()}
return
} else {
done <- *res
@@ -190,7 +190,7 @@ func (self *Session) dispatchRequests() {
self.cancel()
}
self.state = SESSION_TIMEOUT
- r := &Result{500, "session timed out", 0, 0}
+ r := &Result{ResponseCode: http.StatusInternalServerError, ErrorString: "session timed out"}
self.callDoneHandler(r)
if self.removeFunc != nil {
self.removeFunc()