We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ab81397 + 3655c42 commit b39080eCopy full SHA for b39080e
jenkins.go
@@ -61,7 +61,7 @@ func (j *Jenkins) Init(ctx context.Context) (*Jenkins, error) {
61
}
62
63
j.Version = rsp.Header.Get("X-Jenkins")
64
- if j.Raw == nil {
+ if j.Raw == nil || rsp.StatusCode != http.StatusOK {
65
return nil, errors.New("Connection Failed, Please verify that the host and credentials are correct.")
66
67
0 commit comments