ai-chatbot icon indicating copy to clipboard operation
ai-chatbot copied to clipboard

Unhandled Runtime Error When Unauthorized

Open leohxj opened this issue 1 year ago • 5 comments

clone and run this repo first time, chat request is not authorized, but the site window got a runtime error:

image

then I set onError options for useChat hook, it still happens.

leohxj avatar Jun 19 '23 01:06 leohxj

same error+1

YYvanYang avatar Jun 20 '23 11:06 YYvanYang

+1 (local development)

ZiggStardust avatar Jun 20 '23 23:06 ZiggStardust

If you add VERCEL_ENV="preview" to the .env this resolves the app/api/chat/route.ts request issue - if that's the error your getting

ZiggStardust avatar Jun 21 '23 00:06 ZiggStardust

same error+1

kahirokunn avatar Jun 21 '23 01:06 kahirokunn

Unsubscribe.

Sent from Yahoo Mail for iPhone

On Tuesday, June 20, 2023, 9:48 PM, kahirokunn @.***> wrote:

same error+1

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

Austin88-pro avatar Jun 21 '23 03:06 Austin88-pro

This is now resolved as we are now forcing auth, even on preview deployments.

jaredpalmer avatar Jun 22 '23 17:06 jaredpalmer

If you continue to see this problem, please re-open

jaredpalmer avatar Jun 22 '23 17:06 jaredpalmer