Add auth debug logging

This commit is contained in:
OpenClaw Bot 2026-02-21 15:50:17 -06:00
parent 5b7efa2c18
commit cd0fdfbd60

View File

@ -65,8 +65,10 @@ export async function POST(request: Request) {
try {
const user = await getAuthenticatedUser();
if (!user) {
return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
console.error(">>> API POST: No authenticated user");
return NextResponse.json({ error: "Unauthorized - please log in again" }, { status: 401 });
}
console.log(">>> API POST: Authenticated as", user.email);
const body = await request.json();
const { task } = body as { task?: Task };