Made it an else to prevent some problems with it returning 500

This commit is contained in:
Tracker-Friendly 2024-06-25 01:43:58 +01:00
parent c3eeee81ec
commit 54f78cf36e
1 changed files with 4 additions and 3 deletions

View File

@ -936,11 +936,12 @@ func main() {
if errors.Is(err, sqlite3.ErrConstraint) {
c.String(400, "Only one login is permitted at a time. Please try again later.")
return
}
} else {
log.Println("[ERROR] Unknown in /api/auth insert at", strconv.FormatInt(time.Now().Unix(), 10)+":", err)
c.String(500, "Something went wrong on our end. Please report this bug at https://centrifuge.hectabit.org/hectabit/burgerauth and refer to the docs for more info. Your error code is: UNKNOWN-API-AUTH-INSERT.")
return
}
}
if randomBytes != "" {
c.Redirect(302, redirect_uri+"?code="+randomBytes+"&state="+state)