3
0

Make import fail reason a string

This commit is contained in:
Tomaž Jerman 2019-08-29 18:11:30 +02:00
parent 530731736b
commit 0cb542cb9e

View File

@ -100,7 +100,7 @@ type (
EntryCount uint64 `json:"entryCount"`
Completed uint64 `json:"completed"`
Failed uint64 `json:"failed"`
FailReason error `json:"failReason"`
FailReason string `json:"failReason,omitempty"`
}
)
@ -241,7 +241,7 @@ func (svc record) Import(ses *RecordImportSession, ssvc ImportSessionService) er
_, err := svc.Create(mod)
if err != nil {
ses.Progress.Failed++
ses.Progress.FailReason = err
ses.Progress.FailReason = err.Error()
if ses.OnError == IMPORT_ON_ERROR_FAIL {
fa := time.Now()