Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
EHJ-52n opened this issue Sep 6, 2018 · 1 comment

Comments

@EHJ-52n
Copy link

EHJ-52n commented Sep 6, 2018

I am currently using version 7c62b9b 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.

@github-actions
Copy link

Stale issue message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants