mirror of
https://github.com/lukaszraczylo/traefikoidc.git
synced 2026-06-05 22:44:17 +00:00
Consolidate error handling.
This commit is contained in:
+2
-1
@@ -75,6 +75,7 @@ type Logger interface {
|
||||
Errorf(format string, args ...interface{})
|
||||
}
|
||||
|
||||
func handleError(w http.ResponseWriter, message string, code int) {
|
||||
func handleError(w http.ResponseWriter, message string, code int, logger Logger) {
|
||||
logger.Errorf(message)
|
||||
http.Error(w, message, code)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user