Skip to content

Commit 6791f2f

Browse files
author
Shubham Naik
committed
fix: add errors for not providing proper slug def
1 parent a6bb611 commit 6791f2f

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

example-apps/next-js-customer-support-bot/src/app/api/start-chat/route.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,14 @@ export async function POST(req: NextRequest) {
8383
});
8484
}
8585

86+
if (!LETTA_TEMPLATE_NAME) {
87+
throw new Error('LETTA_TEMPLATE_NAME is not defined');
88+
}
89+
90+
if (!LETTA_PROJECT_SLUG) {
91+
throw new Error('LETTA_PROJECT_SLUG is not defined');
92+
}
93+
8694
const response = await lettaServerClient.client.templates.createAgents(LETTA_PROJECT_SLUG, LETTA_TEMPLATE_NAME, {
8795
memoryVariables: {
8896
name: identity.name || 'Unnamed',

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "create-letta-app",
33
"description": "Automagically discover and generate sample projects using Letta",
4-
"version": "0.0.10",
4+
"version": "0.0.11",
55
"author": "Letta",
66
"bin": {
77
"create-letta-app": "./bin/run.js"

0 commit comments

Comments
 (0)