class NacosApiExceptionHandler {

	private static final Logger LOGGER = LoggerFactory.getLogger(NacosApiExceptionHandler.class);

	@ExceptionHandler(NacosApiException.class)
	public ResponseEntity<Result<String>> handleNacosApiException(NacosApiException e) {
		LOGGER.error("got exception. {} {}", e.getErrAbstract(), e.getErrMsg());
		return ResponseEntity.status(e.getErrCode())
			.body(new Result<>(e.getDetailErrCode(), e.getErrAbstract(), e.getErrMsg()));
	}

	@ExceptionHandler(NacosException.class)
	public ResponseEntity<Result<String>> handleNacosException(NacosException e) {
		LOGGER.error("got exception. {}", e.getErrMsg());
		return ResponseEntity.status(e.getErrCode()).body(Result.failure(ErrorCode.SERVER_ERROR, e.getErrMsg()));
	}

	@ResponseStatus(HttpStatus.BAD_REQUEST)
	@ExceptionHandler(HttpMessageNotReadableException.class)
	public Result<String> handleHttpMessageNotReadableException(HttpMessageNotReadableException e) {
		LOGGER.error("got exception. {} {}", e.getMessage(), ExceptionUtil.getAllExceptionMsg(e));
		return Result.failure(ErrorCode.PARAMETER_MISSING, e.getMessage());
	}

	@ResponseStatus(HttpStatus.BAD_REQUEST)
	@ExceptionHandler(HttpMessageConversionException.class)
	public Result<String> handleHttpMessageConversionException(HttpMessageConversionException e) {
		LOGGER.error("got exception. {} {}", e.getMessage(), ExceptionUtil.getAllExceptionMsg(e));
		return Result.failure(ErrorCode.PARAMETER_VALIDATE_ERROR, e.getMessage());
	}

	@ResponseStatus(HttpStatus.BAD_REQUEST)
	@ExceptionHandler(NumberFormatException.class)
	public Result<String> handleNumberFormatException(NumberFormatException e) {
		LOGGER.error("got exception. {} {}", e.getMessage(), ExceptionUtil.getAllExceptionMsg(e));
		return Result.failure(ErrorCode.PARAMETER_VALIDATE_ERROR, e.getMessage());
	}

	@ResponseStatus(HttpStatus.BAD_REQUEST)
	@ExceptionHandler(IllegalArgumentException.class)
	public Result<String> handleIllegalArgumentException(IllegalArgumentException e) {<FILL_FUNCTION_BODY>}

	@ResponseStatus(HttpStatus.BAD_REQUEST)
	@ExceptionHandler(MissingServletRequestParameterException.class)
	public Result<String> handleMissingServletRequestParameterException(MissingServletRequestParameterException e) {
		LOGGER.error("got exception. {} {}", e.getMessage(), ExceptionUtil.getAllExceptionMsg(e));
		return Result.failure(ErrorCode.PARAMETER_MISSING, e.getMessage());
	}

	@ResponseStatus(HttpStatus.BAD_REQUEST)
	@ExceptionHandler(HttpMediaTypeException.class)
	public Result<String> handleHttpMediaTypeException(HttpMediaTypeException e) {
		LOGGER.error("got exception. {} {}", e.getMessage(), ExceptionUtil.getAllExceptionMsg(e));
		return Result.failure(ErrorCode.MEDIA_TYPE_ERROR, e.getMessage());
	}

	@ResponseStatus(HttpStatus.FORBIDDEN)
	@ExceptionHandler(AccessException.class)
	public Result<String> handleAccessException(AccessException e) {
		LOGGER.error("got exception. {} {}", e.getMessage(), ExceptionUtil.getAllExceptionMsg(e));
		return Result.failure(ErrorCode.ACCESS_DENIED, e.getErrMsg());
	}

	@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
	@ExceptionHandler(value = { DataAccessException.class, ServletException.class, IOException.class })
	public Result<String> handleDataAccessException(Exception e) {
		LOGGER.error("got exception. {} {}", e.getMessage(), ExceptionUtil.getAllExceptionMsg(e));
		return Result.failure(ErrorCode.DATA_ACCESS_ERROR, e.getMessage());
	}

	@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
	@ExceptionHandler(Exception.class)
	public Result<String> handleOtherException(Exception e) {
		LOGGER.error("got exception. {} {}", e.getMessage(), ExceptionUtil.getAllExceptionMsg(e));
		return Result.failure(e.getMessage());
	}

}

		LOGGER.error("got exception. {} {}", e.getMessage(), ExceptionUtil.getAllExceptionMsg(e));
		return Result.failure(ErrorCode.PARAMETER_VALIDATE_ERROR, e.getMessage());
	
<no_super_class>