mirror of
https://github.com/stackblitz-labs/bolt.diy
synced 2025-01-22 10:55:34 +00:00
fix: show warning on starter template failure and continue (#960)
Some checks are pending
Update Stable Branch / prepare-release (push) Waiting to run
Some checks are pending
Update Stable Branch / prepare-release (push) Waiting to run
This commit is contained in:
parent
608d9338a8
commit
d2ba8d3be3
@ -297,7 +297,15 @@ export const ChatImpl = memo(
|
||||
});
|
||||
|
||||
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) {
|
||||
const { assistantMessage, userMessage } = temResp;
|
||||
|
Loading…
Reference in New Issue
Block a user