Huazai
Huazai
apikey被封、限流或者余额不足时,拿不到OpenAI返回的原始错误信息 例如: ``` { "error": { "message": "You exceeded your current quota, please check your plan and billing details.", "type": "insufficient_quota", "param": null, "code": "insufficient_quota" } } ``` 因此无法根据错误信息里面的code去修改我数据库里面apikey的状态。
SpringBoot 全局异常处理器 ``` @RestControllerAdvice public class GlobalExceptionHandler { @ExceptionHandler(BaseException.class) public R handleBaseException(BaseException ex) { log.info("Exception occurred: " + ex.getMessage(), ex); return R.failed(300, "处理失败,请重试~"); } } ``` DynamicKeyOpenAiAuthInterceptor里面的异常是OKHTTP子线程抛出的,流式输出的时候怎么把异常返给前端?
Version: 1.0.216 Platform: macOS arm64 24.1.0 Plugins: sync-config, sftp-tab, quick-cmds Frontend: xterm-webgl After upgrading to the latest version, MySQL cannot be connected through a tunnel, and the error message is...