Commit 3dfbac10 authored by fodorpatrik2000's avatar fodorpatrik2000 👻
Browse files

error handling

parent 5f018562
Pipeline #8685 passed with stage
in 1 minute and 20 seconds
......@@ -123,8 +123,8 @@ func init() {
e = json.Unmarshal(b, &prods)
for _, p := range prods {
_, e := db.Model(p).Insert()
if e != nil {
// TODO: log error
if e != nil && !strings.Contains(e.Error(), "ERROR #23505") {
helpers.Logger.Println(e)
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment