Skip to content

Commit

Permalink
Catch error in table creation
Browse files Browse the repository at this point in the history
  • Loading branch information
ar-siddiqui committed Nov 22, 2023
1 parent 8054a3e commit 3c31b2c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion api/jobs/database_postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ func NewPostgresDB(dbConnString string) (*PostgresDB, error) {
}

db := PostgresDB{Handle: h}
db.createTables()
err = db.createTables()
if err != nil {
return nil, err
}
return &db, nil
}

Expand Down

0 comments on commit 3c31b2c

Please sign in to comment.