fix: vault statistics

a function called map_field is introduced which allows to specify
type format.
Is the exception correct?
Shouldn't it be ValueError?
Is the assignment in except correct?