package com.dbs.consentServer.handler;

import com.dbs.consentServer.exception.ItemNotFoundException;

import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
import org.springframework.web.context.request.WebRequest;
import org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler;

// @RestControllerAdvice
public class ServerExceptionHandler{

  // @ExceptionHandler(value = {IllegalArgumentException.class, IllegalStateException.class, ItemNotFoundException.class})
  // protected ResponseEntity<Object> handleNoItemFound(final RuntimeException ex, WebRequest request){
  //   return handleExceptionInternal(ex, "no item", new HttpHeaders(), HttpStatus.NO_CONTENT, request);
  // }
  

  // @ExceptionHandler(NoItemException.class)
  // @ResponseStatus(value = HttpStatus.NO_CONTENT, reason = "no item found")
  // public void nonResult(NoItemException exception, HttpServletResponse response){
    
  // }

  // @ResponseStatus(value = HttpStatus.INTERNAL_SERVER_ERROR, reason = "OCRTAG creation failed")
  // @ExceptionHandler(OcrTagException.class)
  // public void ocrTagException(OcrTagException e, HttpServletResponse response){
    
  // }

  // @ResponseStatus(value = HttpStatus.BAD_REQUEST, reason = "bad parameter")
  // @ExceptionHandler(RequestParameterException.class)
  // public void emptyParameterException(RequestParameterException e, HttpServletResponse response){

  // }
}