Skip to content

Commit 9d0cb86

Browse files
committed
Improve error messages
1 parent 7a75b3f commit 9d0cb86

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/backend/src/route-handlers/smart-request.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,14 +227,14 @@ async function parseAuth(req: NextRequest): Promise<SmartRequestAuth | null> {
227227
break;
228228
}
229229
default: {
230-
throw new StackAssertionError(`Unexpected request type: ${requestType}. We should've filtered this earlier`);
230+
throw new StackAssertionError(`Unexpected request type: ${requestType}. This should never happen because we should've filtered this earlier`);
231231
}
232232
}
233233
}
234234

235235
const project = await getProject(projectId);
236236
if (!project) {
237-
throw new StackAssertionError("Project not found; this should never happen because having a project ID should guarantee a project", { projectId });
237+
throw new StackAssertionError("Project not found; this should never happen because passing the checks until here should guarantee that the project exists and that access to it is granted", { projectId });
238238
}
239239

240240
let user = null;

0 commit comments

Comments
 (0)