Sfoglia il codice sorgente

error handling for github action

Alexander Belanger 5 anni fa
parent
commit
4fdc204d8d
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      server/api/git_action_handler.go

+ 2 - 2
server/api/git_action_handler.go

@@ -121,7 +121,7 @@ func (app *App) createGitActionFromForm(
 	})
 	})
 
 
 	if err != nil {
 	if err != nil {
-		http.Error(w, err.Error(), http.StatusInternalServerError)
+		app.handleErrorInternal(err, w)
 		return nil
 		return nil
 	}
 	}
 
 
@@ -143,7 +143,7 @@ func (app *App) createGitActionFromForm(
 	_, err = gaRunner.Setup()
 	_, err = gaRunner.Setup()
 
 
 	if err != nil {
 	if err != nil {
-		http.Error(w, err.Error(), http.StatusInternalServerError)
+		app.handleErrorInternal(err, w)
 		return nil
 		return nil
 	}
 	}