Added log messages for a few errors
This commit is contained in:
@@ -49,6 +49,7 @@ func (b *Backend) countLog(w http.ResponseWriter, r *http.Request) {
|
||||
ap := b.GetApp(hdr.Key)
|
||||
count := ap.CountTable()
|
||||
if count == nil {
|
||||
log.Println(ap.AppID(), "misconfigured: count table is nil.")
|
||||
ReturnError(w, http.StatusInternalServerError, "misconfigured", "Server Misconfigured")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -112,6 +112,7 @@ func (b *Backend) managementDeleteCrash(w http.ResponseWriter, r *http.Request)
|
||||
func (b *Backend) actualCrashDelete(ctx context.Context, w http.ResponseWriter, ap App, crashID string) {
|
||||
crash := ap.CrashTable()
|
||||
if crash == nil {
|
||||
log.Println(ap.AppID(), "misconfigured: crash table is nil.")
|
||||
ReturnError(w, http.StatusInternalServerError, "misconfigured", "Server Misconfigured")
|
||||
return
|
||||
}
|
||||
@@ -166,6 +167,7 @@ func (b *Backend) managementArchiveCrash(w http.ResponseWriter, r *http.Request)
|
||||
func (b *Backend) actualCrashArchive(ctx context.Context, w http.ResponseWriter, ap App, toArchive ArchivedCrash) {
|
||||
crash := ap.CrashTable()
|
||||
if crash == nil {
|
||||
log.Println(ap.AppID(), "misconfigured: crash table is nil.")
|
||||
ReturnError(w, http.StatusInternalServerError, "misconfigured", "Server Misconfigured")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -301,6 +301,7 @@ func (b *Backend) login(w http.ResponseWriter, r *http.Request) {
|
||||
if err == nil {
|
||||
ret.Token, err = b.GenerateJWT(u.ToReqUser())
|
||||
if err != nil {
|
||||
log.Println("error generating JWT token:", err)
|
||||
ReturnError(w, http.StatusInternalServerError, "internal", "Server error")
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user