AlreadyExistsException.java 658 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
package pwc.taxtech.atms.exception;

import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;

public class AlreadyExistsException extends ApiException {
    public AlreadyExistsException() {
        super();
    }

    public AlreadyExistsException(String message) {
        super(message);
    }

    public AlreadyExistsException(String message, Throwable cause) {
        super(message, cause);
    }

    public AlreadyExistsException(Throwable cause) {
        super(cause);
    }

    @Override
    public <Object> ResponseEntity handle() {
        return ResponseEntity.status(HttpStatus.CONFLICT).build();
    }
}