code: def error_message_and_exit(message, error_result):
      
      if message:
          error_message(message)
      puts(json.dumps(error_result, indent=2))
      sys.exit(1)
docs: Prints error messages in blue, the failed task result and quits.