Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

fix: retrieve api prompts (#963)

Max Deichmann4b213151d1f5
diff --git a/src/features/prompts/server/prompt-router.ts b/src/features/prompts/server/prompt-router.ts
index d96a1f8039..304c31e018 100644
--- a/src/features/prompts/server/prompt-router.ts
+++ b/src/features/prompts/server/prompt-router.ts
@@ -168,12 +168,12 @@ export const promptRouter = createTRPCRouter({
const joinedPromptAndUsers = prompts.map((p) => {
const user = users.find((u) => u.id === p.createdBy);
- if (!user && p.createdBy !== "API") {
+ if (!user && p.createdBy === "API") {
return { ...p, creator: "API" };
}
if (!user) {
console.log(`User not found for promptId ${p.id}`);
- throw new Error("User not found");
+ throw new Error("User not found for promptId ${p.id}");
}
return {
...p,