code: def format_error(module, error):
      
      logging.error(module)
      # Beautify JSON error
      print error.message
      print json.dumps(error.error, sort_keys=True, indent=4, separators=(',', ': '))
      exit(1)
docs: Format the error for the given module.