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
the code is below
jenkins.all_builds('xxxx', 'id,timestamp,result,actions[*]', function(err, data) {
if (err){
console.log('err1', err);
}
console.log('data',data)
});
it runs error and returns ‘Server returned unexpected status code: 400’
this error is caused by the invalid character, you can find '[]' this two is invalid in tomcat of the request url api/json?tree=allBuilds[id,timestamp,result,duration].
for the temporary solution, you can wrap the biuldUrl function by encodeURI in the lib/main.js of line 309. or you can overwrite this allBuilds function by yourself.
this error is caused by the invalid character, you can find '[]' this two is invalid in tomcat of the request url api/json?tree=allBuilds[id,timestamp,result,duration]. for the temporary solution, you can wrap the biuldUrl function by encodeURI in the lib/main.js of line 309. or you can overwrite this allBuilds function by yourself.
But this solution may caused another issue, that the params of build-with-params also be encode
Activity
see311 commentedon May 4, 2022
this error is caused by the invalid character, you can find '[]' this two is invalid in tomcat of the request url
api/json?tree=allBuilds[id,timestamp,result,duration].for the temporary solution, you can wrap the
biuldUrlfunction byencodeURIin thelib/main.jsof line 309. or you can overwrite thisallBuildsfunction by yourself.see311 commentedon May 23, 2022
But this solution may caused another issue, that the params of build-with-params also be encode