incubator-devlake icon indicating copy to clipboard operation
incubator-devlake copied to clipboard

[Refactor][gitlab,jira,jenkins,tapd] Missing error handling

Open Pranshu-Raj opened this issue 3 years ago • 2 comments

Missing error handling in GET GET /plugins/gitlab/connections/connectionId Missing error handling in GET GET /plugins/jenkins/connections/connectionId Missing error handling in GET GET /plugins/jira/connections/connectionId Missing error handling in GET GET /plugins/tapd/connections/connectionId

To fix the error handling part {missing: if err != nil { return nil, err }}

Pranshu-Raj avatar Jul 21 '22 05:07 Pranshu-Raj

Thanks for reporting the issue. I'm looking forward to your PR.

mappjzc avatar Jul 22 '22 01:07 mappjzc

image I have finished to looking forward to your PR. The err has been return whether it is empty or not.

You can changed the code as

if err != nil {
    return nil,err
}
return &core.ApiResourceOutput{Body: connection}, nil

and update your pr.

mappjzc avatar Jul 22 '22 02:07 mappjzc

This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.

github-actions[bot] avatar Aug 22 '22 00:08 github-actions[bot]

This issue has been closed because it has not received response for too long time. You could reopen it if you encountered similar problems in the future.

github-actions[bot] avatar Aug 29 '22 00:08 github-actions[bot]