Minor cleanup
Make sure AttributeError only formats ConfigItem as json if ex.message is accessed. This removes the overhead of 'hasattr' when attribute does not exist.