Made it an else to prevent some problems with it returning 500
This commit is contained in:
parent
c3eeee81ec
commit
54f78cf36e
7
main.go
7
main.go
|
@ -936,10 +936,11 @@ func main() {
|
||||||
if errors.Is(err, sqlite3.ErrConstraint) {
|
if errors.Is(err, sqlite3.ErrConstraint) {
|
||||||
c.String(400, "Only one login is permitted at a time. Please try again later.")
|
c.String(400, "Only one login is permitted at a time. Please try again later.")
|
||||||
return
|
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
|
||||||
}
|
}
|
||||||
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 != "" {
|
if randomBytes != "" {
|
||||||
|
|
Reference in New Issue