@@ -0,0 +1,1212 @@
+package me.amarpandey.urlshortener.controller;%0A%0Aimport me.amarpandey.urlshortener.controller.response.Response;%0Aimport org.springframework.http.ResponseEntity;%0Aimport org.springframework.web.HttpMediaTypeException;%0Aimport org.springframework.web.bind.annotation.ControllerAdvice;%0Aimport org.springframework.web.bind.annotation.ExceptionHandler;%0Aimport org.springframework.web.client.HttpClientErrorException;%0A%0Aimport static org.springframework.http.HttpStatus.BAD_REQUEST;%0A%0A@ControllerAdvice%0Apublic class GlobalExceptionHandler %7B%0A%0A    @ExceptionHandler(%7BHttpClientErrorException.class%7D)%0A    public ResponseEntity%3CResponse%3E handleClientError(HttpClientErrorException e) %7B%0A        return ResponseEntity.status(e.getStatusCode()).body(new Response(e.getMessage()));%0A    %7D%0A%0A    @ExceptionHandler(%7BException.class%7D)%0A    public ResponseEntity%3CResponse%3E handleAllException(Exception e) %7B%0A        return ResponseEntity.status(BAD_REQUEST).body(new Response(e.getMessage()));%0A    %7D%0A%0A    @ExceptionHandler(%7BHttpMediaTypeException.class%7D)%0A    public ResponseEntity%3CResponse%3E handleMediaTypeException(HttpMediaTypeException e) %7B%0A        return ResponseEntity.status(BAD_REQUEST).body(new Response(e.getMessage()));%0A    %7D%0A%0A%7D%0A

Add Global exception Handler