mirror of
https://github.com/ddworken/hishtory.git
synced 2024-12-24 15:58:52 +01:00
Fix missing err != nil branch
This commit is contained in:
parent
d94e1bfa22
commit
1ab61f1d7d
@ -338,10 +338,12 @@ func (s *Server) getNumConnectionsHandler(w http.ResponseWriter, r *http.Request
|
||||
}
|
||||
|
||||
func (s *Server) handleNonCriticalError(err error) {
|
||||
if s.isProductionEnvironment {
|
||||
fmt.Printf("Unexpected non-critical error: %v", err)
|
||||
} else {
|
||||
panic(fmt.Errorf("unexpected non-critical error: %w", err))
|
||||
if err != nil {
|
||||
if s.isProductionEnvironment {
|
||||
fmt.Printf("Unexpected non-critical error: %v", err)
|
||||
} else {
|
||||
panic(fmt.Errorf("unexpected non-critical error: %w", err))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user