File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed
src/main/java/com/browserstack/automate/ci/jenkins/qualityDashboard Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -19,13 +19,18 @@ public static BrowserStackCredentials getBrowserStackCreds() {
1919 }
2020
2121 public static String getItemTypeModified (Item job ) {
22- if (job instanceof Job ) {
23- return job .getClass ().getSimpleName ().toUpperCase ();
24- }
25- else if (job .getClass ().getName ().contains ("Folder" )) {
26- return "FOLDER" ;
27- }
28- else {
22+ try {
23+ if (job instanceof Job ) {
24+ return job .getClass ().getSimpleName ().toUpperCase ();
25+ }
26+ else if (job .getClass ().getName ().contains ("Folder" )) {
27+ return "FOLDER" ;
28+ }
29+ else {
30+ return null ;
31+ }
32+ } catch (Exception e ) {
33+ // Return null in case of any error during job type determination
2934 return null ;
3035 }
3136 }
You can’t perform that action at this time.
0 commit comments