diff --git a/src/database/sql/example_service_test.go b/src/database/sql/example_service_test.go index 768307c1471..58b254c3e6b 100644 --- a/src/database/sql/example_service_test.go +++ b/src/database/sql/example_service_test.go @@ -140,6 +140,10 @@ where var orderRef = "ABC123" tx, err := db.BeginTx(ctx, &sql.TxOptions{Isolation: sql.LevelSerializable}) + if err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } _, err = tx.ExecContext(ctx, "stored_proc_name", orderRef) if err != nil {