This is an automated email from the ASF dual-hosted git repository.

abeizn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git

commit 78382ff5cb1f559e25643562c500c9cee3dbf485
Author: PRANSHU RAJ <[email protected]>
AuthorDate: Thu Jul 21 11:07:53 2022 +0530

    perf: added the error handling
    
    added the error handling in GetConnection
---
 plugins/jenkins/api/connection.go | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/plugins/jenkins/api/connection.go 
b/plugins/jenkins/api/connection.go
index edd72385..be180c2e 100644
--- a/plugins/jenkins/api/connection.go
+++ b/plugins/jenkins/api/connection.go
@@ -161,6 +161,9 @@ func ListConnections(input *core.ApiResourceInput) 
(*core.ApiResourceOutput, err
 func GetConnection(input *core.ApiResourceInput) (*core.ApiResourceOutput, 
error) {
        connection := &models.JenkinsConnection{}
        err := connectionHelper.First(connection, input.Params)
+       if err != nil {
+               return nil, err
+       }
        return &core.ApiResourceOutput{Body: connection}, err
 }
 

Reply via email to