mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Unified API response json schema (#3170)
### What problem does this PR solve? Unified API response json schema ### Type of change - [x] Refactoring
This commit is contained in:
@ -248,8 +248,8 @@ export const useSpeechWithSse = (url: string = api.tts) => {
|
||||
});
|
||||
try {
|
||||
const res = await response.clone().json();
|
||||
if (res?.retcode !== 0) {
|
||||
message.error(res?.retmsg);
|
||||
if (res?.code !== 0) {
|
||||
message.error(res?.message);
|
||||
}
|
||||
} catch (error) {
|
||||
console.warn('🚀 ~ error:', error);
|
||||
|
||||
Reference in New Issue
Block a user