Pārlūkot izejas kodu

Merge pull request #331 from porter-dev/log-github-action-error

error handling for github action
abelanger5 5 gadi atpakaļ
vecāks
revīzija
4a278c887c
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  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 {
-		http.Error(w, err.Error(), http.StatusInternalServerError)
+		app.handleErrorInternal(err, w)
 		return nil
 	}
 
@@ -143,7 +143,7 @@ func (app *App) createGitActionFromForm(
 	_, err = gaRunner.Setup()
 
 	if err != nil {
-		http.Error(w, err.Error(), http.StatusInternalServerError)
+		app.handleErrorInternal(err, w)
 		return nil
 	}