mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-30 00:53:14 +00:00
shows error message when request req fails
This commit is contained in:
@@ -38,8 +38,12 @@ export const conversationSlice = createSlice({
|
||||
type: 'ANSWER',
|
||||
});
|
||||
})
|
||||
.addCase(fetchAnswer.rejected, (state) => {
|
||||
.addCase(fetchAnswer.rejected, (state, action) => {
|
||||
state.status = 'failed';
|
||||
state.conversation.push({
|
||||
text: 'Something went wrong. Please try again later.',
|
||||
type: 'ERROR',
|
||||
});
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user