fix: show warning on starter template failure and continue (#960)
This commit is contained in:
@@ -297,7 +297,15 @@ export const ChatImpl = memo(
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (template !== 'blank') {
|
if (template !== 'blank') {
|
||||||
const temResp = await getTemplates(template, title);
|
const temResp = await getTemplates(template, title).catch((e) => {
|
||||||
|
if (e.message.includes('rate limit')) {
|
||||||
|
toast.warning('Rate limit exceeded. Skipping starter template\n Continuing with blank template');
|
||||||
|
} else {
|
||||||
|
toast.warning('Failed to import starter template\n Continuing with blank template');
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
});
|
||||||
|
|
||||||
if (temResp) {
|
if (temResp) {
|
||||||
const { assistantMessage, userMessage } = temResp;
|
const { assistantMessage, userMessage } = temResp;
|
||||||
|
|||||||
Reference in New Issue
Block a user