mirror of
https://github.com/pldubouilh/gossa
synced 2025-12-06 08:22:32 +01:00
respond with http status 500 upon error
This commit is contained in:
parent
e2dc84f829
commit
eb9ba8c099
1 changed files with 1 additions and 0 deletions
|
|
@ -57,6 +57,7 @@ func check(e error) {
|
|||
func exitPath(w http.ResponseWriter, s ...interface{}) {
|
||||
if r := recover(); r != nil {
|
||||
log.Println("error", s, r)
|
||||
w.WriteHeader(500)
|
||||
w.Write([]byte("error"))
|
||||
} else if *verb {
|
||||
log.Println(s...)
|
||||
|
|
|
|||
Loading…
Reference in a new issue