+ Enhance jmx error for unauthenticated users

This commit is contained in:
garnier-quentin 2015-08-03 11:54:30 +02:00
parent 34098a6e3c
commit de7635c044
1 changed files with 1 additions and 1 deletions

View File

@ -203,7 +203,7 @@ sub get_attributes {
$j < scalar(@{$options{request}->[$i]->{attributes}}); $j++, $pos++) {
if ($responses[$pos]->is_error()) {
# 500-599 an error. 400 is an attribute not present
if ($responses[$pos]->status() >= 500) {
if ($responses[$pos]->status() >= 500 || $responses[$pos]->status() == 401) {
$self->{output}->add_option_msg(short_msg => "protocol issue: " . $responses[$pos]->error_text());
$self->{output}->option_exit();
}