@@ -0,0 +1,540 @@
+package com.google.sps.tool;%0A%0Aimport java.io.IOException;%0Aimport javax.servlet.http.HttpServletResponse;%0Aimport com.google.gson.Gson;%0Aimport java.util.Map;%0Aimport java.util.HashMap;%0A%0Apublic class ResponseHandler %7B%0A  %0A  public static void sendErrorMessage(HttpServletResponse response, String error) throws IOException %7B%0A    Map%3CString, String%3E jsonErrorInfo = new HashMap%3C%3E();%0A    jsonErrorInfo.put(%22error%22, error);%0A    response.setContentType(%22application/json;%22);%0A    response.getWriter().println(new Gson().toJson(jsonErrorInfo));%0A  %7D%0A%7D%0A

Add class that handles error