#1718 stats:show() error when statistics not enabled
Reporter
Zash
Owner
Nobody
Created
Updated
Stars
★ (1)
Tags
Milestone-0.12
Priority-Medium
Type-Defect
Status-Accepted
Zash
on
What steps will reproduce the problem?
1. don't enable statistics
2. stats:show() in the shell
What is the expected output?
Some kind of "no stats available" error
What do you see instead?
prosody> stats:show()
! /usr/lib/prosody/modules/mod_admin_shell.lua:1916: attempt to index a nil value (local 'metric_registry')
What version of the product are you using?
Prosody 0.12.0
Please provide any additional information below.
The code does not check whether statsmanager.get_metric_registry() returns nil
What steps will reproduce the problem? 1. don't enable statistics 2. stats:show() in the shell What is the expected output? Some kind of "no stats available" error What do you see instead? prosody> stats:show() ! /usr/lib/prosody/modules/mod_admin_shell.lua:1916: attempt to index a nil value (local 'metric_registry') What version of the product are you using? Prosody 0.12.0 Please provide any additional information below. The code does not check whether statsmanager.get_metric_registry() returns nil