Ignore:
Timestamp:
04/28/25 14:21:17 (3 weeks ago)
Author:
Aleksandar Panovski <apano77@…>
Branches:
main
Children:
e15e8d9
Parents:
f5b256e
Message:

Big change done fully handle_reservation_update() trigger works

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/com/example/rezevirajmasa/demo/config/RestExceptionHandler.java

    rf5b256e rdeea3c4  
    33import com.example.rezevirajmasa.demo.dto.ErrorDto;
    44import com.example.rezevirajmasa.demo.model.exceptions.AppException;
     5import org.springframework.http.HttpStatus;
    56import org.springframework.http.ResponseEntity;
     7import org.springframework.http.converter.HttpMessageNotWritableException;
    68import org.springframework.web.bind.annotation.ControllerAdvice;
    79import org.springframework.web.bind.annotation.ExceptionHandler;
     
    1618                .body(ErrorDto.builder().message(ex.getMessage()).build());
    1719    }
     20
     21    @ExceptionHandler(HttpMessageNotWritableException.class)
     22    public ResponseEntity<String> handleHttpMessageNotWritableException(HttpMessageNotWritableException ex) {
     23        return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("An error occurred while processing the response.");
     24    }
    1825}
Note: See TracChangeset for help on using the changeset viewer.