Fix error message

This commit is contained in:
Kailash Nadh 2019-07-21 21:55:12 +05:30
parent 31b9690d74
commit 3be5b27d03
1 changed files with 4 additions and 3 deletions

View File

@ -89,9 +89,10 @@ func handleSubscriptionPage(c echo.Context) error {
}
if _, err := app.Queries.Unsubscribe.Exec(campUUID, subUUID, blacklist); err != nil {
app.Logger.Printf("Error unsubscribing : %v", err)
return echo.NewHTTPError(http.StatusBadRequest,
"There was an internal error while unsubscribing you.")
app.Logger.Printf("error unsubscribing: %v", err)
return c.Render(http.StatusInternalServerError, "message",
makeMsgTpl("Error", "",
`Error processing request. Please retry.`))
}
return c.Render(http.StatusOK, "message",
makeMsgTpl("Unsubscribed", "",