@@ -0,0 +1,1204 @@
+package com.github.dhavalmehta1997.savetogoogledrive.advice;%0A%0Aimport com.github.dhavalmehta1997.savetogoogledrive.exception.ApiException;%0Aimport com.github.dhavalmehta1997.savetogoogledrive.model.ApiError;%0Aimport org.springframework.http.HttpStatus;%0Aimport org.springframework.http.ResponseEntity;%0Aimport org.springframework.web.bind.annotation.ControllerAdvice;%0Aimport org.springframework.web.bind.annotation.ExceptionHandler;%0A%0Aimport java.util.logging.Level;%0Aimport java.util.logging.Logger;%0A%0A@ControllerAdvice%0Apublic class WebRestControllerAdvice %7B%0A%0A    @ExceptionHandler(ApiException.class)%0A    public ResponseEntity%3CApiError%3E handleApiException(ApiException ex) %7B%0A        ApiError apiError = new ApiError(ex.getStatus(), ex.getMessage(), null);%0A        return new ResponseEntity%3C%3E(apiError, apiError.getStatus());%0A    %7D%0A%0A    @ExceptionHandler(Exception.class)%0A    public ResponseEntity%3CApiError%3E handleGenericException(Exception ex) %7B%0A        Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);%0A        ApiError apiError = new ApiError(HttpStatus.INTERNAL_SERVER_ERROR, ex.getMessage(), null);%0A        return new ResponseEntity%3C%3E(apiError, HttpStatus.INTERNAL_SERVER_ERROR);%0A    %7D%0A%7D%0A

add error handling