You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
awaitLogHandlingHelper.HttpResponseHandling("Upload Package To Repo",$"MethodName:UploadPackageToRepo()",responsemessage,"");
49
52
50
53
// Check status code and handle errors
51
54
if(responsemessage.StatusCode!=HttpStatusCode.OK)
@@ -58,15 +61,17 @@ public static async Task<HttpResponseMessage> UploadPackageToRepo(ComponentsToAr
58
61
}
59
62
catch(HttpRequestExceptionex)
60
63
{
64
+
LogHandlingHelper.ExceptionErrorHandling("UploadPackageToRepo",$"MethodName:UploadPackageToRepo(), ComponentName: {component.Name}",ex,"An HTTP request error occurred while uploading the package to Artifactory.");
61
65
returnHandleUploadException(ex,responsemessage);
62
66
}
63
67
catch(InvalidOperationExceptionex)
64
68
{
69
+
LogHandlingHelper.ExceptionErrorHandling("UploadPackageToRepo",$"MethodName:UploadPackageToRepo(), ComponentName: {component.Name}",ex,"An invalid operation occurred while uploading the package to Artifactory.");
LogHandlingHelper.ExceptionErrorHandling("GettPathForArtifactoryUpload",$"Failed to create directory ",ex,"IOException occurred while creating the directory.");
LogHandlingHelper.ExceptionErrorHandling("GettPathForArtifactoryUpload",$"Unauthorized access while creating directory",ex,"UnauthorizedAccessException occurred while creating the directory.");
@@ -58,9 +59,11 @@ public static Bom GetComponentListFromComparisonBOM(string comparisonBomFilePath
58
59
}
59
60
catch(JsonReaderExceptionex)
60
61
{
62
+
LogHandlingHelper.ExceptionErrorHandling("GetComponentListFromComparisonBOM",$"Failed to deserialize the comparison BOM file at path: {comparisonBomFilePath}",ex,"JsonReaderException occurred while deserializing the comparison BOM.");
61
63
Logger.Error($"Exception occurred in reading the comparison BOM: {ex.Message}");
62
64
environmentHelper.CallEnvironmentExit(-1);
63
65
}
66
+
Logger.Debug("GetComponentListFromComparisonBOM(): Completed the reading and identifying components from bom file.");
if(!(item.SrcRepoName.Contains("Not Found in JFrog")))
271
274
{
275
+
Logger.DebugFormat("PackageUploadToArtifactory():{0} and {1} contains Source repository:{2} and Destination Repository:{3} ,So now started upload package process .",item.Name,item.Version,item.SrcRepoName,item.DestRepoName);
Logger.DebugFormat("PackageUploadToArtifactory(): {0} and {1} is identified in source: {2} and destination: {3} repositories",item.Name,item.Version,item.SrcRepoName,item.DestRepoName);
LogHandlingHelper.LogHttpWebResponse("Attach Component Source",$"Response for attaching component source for ReleaseId: {attachReport.ReleaseId}",httpResponse);
94
96
}
95
97
}
96
98
catch(UriFormatExceptionex)
97
99
{
100
+
LogHandlingHelper.ExceptionErrorHandling(AttachmentErrorMessage,$"AttachComponentSourceToSW360():Failed to attach component source for ReleaseId: {attachReport.ReleaseId}",ex,$"Invalid URI format: {url.AbsoluteUri}");
LogHandlingHelper.ExceptionErrorHandling(AttachmentErrorMessage,$"AttachComponentSourceToSW360():Failed to attach component source for ReleaseId: {attachReport.ReleaseId}",ex,"A security exception occurred. Ensure the application has the required permissions.");
LogHandlingHelper.ExceptionErrorHandling(AttachmentErrorMessage,$"AttachComponentSourceToSW360():Failed to attach component source for ReleaseId: {attachReport.ReleaseId}",ex,"An I/O error occurred while processing the attachment.");
0 commit comments