-
Notifications
You must be signed in to change notification settings - Fork 193
Add Cascade Prediction Feature #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Add OAuth proxy route for authenticated API calls - Update valyu.ts to support OAuth tokens with proxy fallback - Add shared usage limits (5 event loads, 2 country clicks) - Show sign-in modal when limits reached in valyu mode - Self-hosted mode unchanged - uses API key with no limits - Add loading time estimate to country conflicts modal - Fix dialog header centering - Update auth panel with globe icon Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
event classification
| console.error("Cascade analysis error:", error); | ||
| const errorMessage = error instanceof Error ? error.message : "Unknown error"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably switch these around and log the errorMessage instead? I guess a mixture of both is fine.
| const requiresReauth = searchResultsArrays.some((r) => r.requiresReauth); | ||
| if (requiresReauth) { | ||
| return NextResponse.json( | ||
| { error: "auth_error", message: "Session expired. Please sign in again.", requiresReauth: true }, | ||
| { status: 401 } | ||
| ); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since requiresReauth isn't being used elsewhere you can place the .some statement inside of the if statement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not return the response.status for a more preciese error code?
Description:
Summary
Changes
How to Test