Przeglądaj źródła

Merge pull request #333 from porter-dev/master

github action error handling
abelanger5 5 lat temu
rodzic
commit
874c95f3b6
1 zmienionych plików z 2 dodań i 2 usunięć
  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
 	}
 	}