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

Hide password when raising error #80

Merged
merged 3 commits into from
Aug 29, 2017
Merged

Conversation

bbaugher
Copy link
Contributor

Without this I would get this,

zabbixapi/lib/zabbixapi/client.rb:108:in `_request': Server answer API error (ZabbixApi::ApiError)
 {
  "code": -32602,
  "message": "Invalid params.",
  "data": "Login name or password is incorrect."
}
 on request:
 {
  "method": "user.login",
  "params": {
    "user": "Admin",
    "password": "zabbix"
  },
  "id": 55213,
  "jsonrpc": "2.0"
}

With this change its now,

zabbixapi/lib/zabbixapi/client.rb:108:in `_request': Server answer API error (ZabbixApi::ApiError)
 {
  "code": -32602,
  "message": "Invalid params.",
  "data": "Login name or password is incorrect."
}
 on request:
 {
  "method": "user.login",
  "params": {
    "user": "Admin",
    "password": "***"
  },
  "id": 69191,
  "jsonrpc": "2.0"
}

@aladmit
Copy link

aladmit commented Aug 29, 2017

Thank you @bbaugher

@aladmit aladmit merged commit 4f6c9f9 into express42:master Aug 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants