Add error display to file upload
This commit is contained in:
parent
344f4bcaa5
commit
66d35428fa
7 changed files with 93 additions and 28 deletions
|
|
@ -192,9 +192,11 @@ func JobImport(ctx context.Context, txn bob.Executor, file_id int32) error {
|
|||
err = importCSV(ctx, file_id, parseCSVFlyover, processCSVFlyover)
|
||||
}
|
||||
if err != nil {
|
||||
log.Debug().Err(err).Msg("failed to import CSV")
|
||||
_, err := psql.Update(
|
||||
um.Table("fileupload.file"),
|
||||
um.SetCol("status").ToArg("error"),
|
||||
um.SetCol("error").ToArg(err.Error()),
|
||||
um.Where(psql.Quote("id").EQ(psql.Arg(file_id))),
|
||||
).Exec(ctx, db.PGInstance.BobDB)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue