contrib icon indicating copy to clipboard operation
contrib copied to clipboard

contrib/jenkins/jenkins_ Add better error message in case of not authorized response from server

Open EHJ-52n opened this issue 5 years ago • 1 comments

I am currently using version 7c62b9b6deb8191889ba817df10005366524fa8b of the jenkins plugin.

When providing a not working API token, I expected something like:

Not authorized. Provided API token username combination is not working.

Received response for each three modes of the plugin is the following:

malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "(end of string)") at /etc/munin/plugins/jenkins_running line 200.

When executing the wget call that is performed by the plugin without -q0-, I received the following error message:

HTTP request sent, awaiting response... 401 Invalid password/token for user: MySecretJenkinsUser
Authorization failed.

So, maybe it is possible to check for the HTTP response code or something else before passing it to the JSON decoder.

EHJ-52n avatar Sep 06 '18 08:09 EHJ-52n

Stale issue message

github-actions[bot] avatar Apr 17 '21 02:04 github-actions[bot]