~pkal/survey

4612604ec706fda01f23c125be47452e949ad173 — Philip K 1 year, 1 month ago 38df87e
Don't die while processing a submission request
1 files changed, 4 insertions(+), 1 deletions(-)

M survey.go
M survey.go => survey.go +4 -1
@@ 290,7 290,10 @@ func submit(w http.ResponseWriter, r *http.Request) {
				_, err = stmt.Exec(i, nil, value)
			}
		default:
			l.Fatalf("Invalid question type '%v'", q.Type)
			l.Print("Invalid question type '%v'", q.Type)
			http.Error(w, "invalid form data",
				http.StatusBadRequest)
			tx.Rollback()
		}

		if err != nil {