@@ -127,22 +127,24 @@ public ModelAndView createWorkflow(@Valid WorkflowForm workflowForm, BindingResu
127
127
return new ModelAndView ("redirect:" + gitInfo .getInternalUrl ());
128
128
}
129
129
} catch (TransportException ex ) {
130
+ logger .warn ("git.sshError " + workflowForm , ex );
130
131
bindingResult .rejectValue ("url" , "git.sshError" );
131
132
return new ModelAndView ("index" );
132
133
} catch (GitAPIException ex ) {
134
+ logger .error ("git.retrievalError " + workflowForm , ex );
133
135
bindingResult .rejectValue ("url" , "git.retrievalError" );
134
- logger .error ("Git API Error" , ex );
135
136
return new ModelAndView ("index" );
136
137
} catch (WorkflowNotFoundException ex ) {
138
+ logger .warn ("git.pathTraversal " + workflowForm , ex );
137
139
bindingResult .rejectValue ("url" , "git.pathTraversal" );
138
140
return new ModelAndView ("index" );
139
141
} catch (Exception ex ) {
142
+ logger .warn ("url.parsingError " + workflowForm , ex );
140
143
bindingResult .rejectValue ("url" , "url.parsingError" );
141
144
return new ModelAndView ("index" );
142
145
}
143
146
}
144
147
gitInfo = workflow .getRetrievedFrom ();
145
-
146
148
// Redirect to the workflow
147
149
return new ModelAndView ("redirect:" + gitInfo .getInternalUrl ());
148
150
}
@@ -473,12 +475,16 @@ private ModelAndView getWorkflow(GitDetails gitDetails, RedirectAttributes redir
473
475
}
474
476
}
475
477
} catch (TransportException ex ) {
478
+ logger .warn ("git.sshError " + workflowForm , ex );
476
479
errors .rejectValue ("url" , "git.sshError" , "SSH URLs are not supported, please provide a HTTPS URL for the repository or submodules" );
477
480
} catch (GitAPIException ex ) {
481
+ logger .error ("git.retrievalError " + workflowForm , ex );
478
482
errors .rejectValue ("url" , "git.retrievalError" , "The workflow could not be retrieved from the Git repository using the details given" );
479
483
} catch (WorkflowNotFoundException ex ) {
484
+ logger .warn ("git.pathTraversal " + workflowForm , ex );
480
485
errors .rejectValue ("url" , "git.pathTraversal" , "The path given did not resolve to a location within the repository" );
481
486
} catch (IOException ex ) {
487
+ logger .warn ("git.parsingError " + workflowForm , ex );
482
488
errors .rejectValue ("url" , "url.parsingError" , "The workflow could not be parsed from the given URL" );
483
489
}
484
490
}
0 commit comments