Open wangpenghua opened 1 year ago
SpringBoot 全局异常处理器
@RestControllerAdvice public class GlobalExceptionHandler { @ExceptionHandler(BaseException.class) public R<String> handleBaseException(BaseException ex) { log.info("Exception occurred: " + ex.getMessage(), ex); return R.failed(300, "处理失败,请重试~"); } }
DynamicKeyOpenAiAuthInterceptor里面的异常是OKHTTP子线程抛出的,流式输出的时候怎么把异常返给前端?
SpringBoot 全局异常处理器
DynamicKeyOpenAiAuthInterceptor里面的异常是OKHTTP子线程抛出的,流式输出的时候怎么把异常返给前端?