mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-04 16:09:05 +00:00
## Summary Fixes duplicate error notifications when NL-to-SQL generation fails due to 403. The `throw` in `generateAndUpdateQuery` was caught by the catch block which showed a second generic "Failed to generate SQL query" notification on top of the correct Unauthorized message. Now returns early for auth errors, matching the pattern used in alerts. ## Before User sees two notifications: 1. "Unauthorized Access: You are not authorized..." 2. "Failed to generate SQL query. Please try again." ## After User sees only: 1. "Unauthorized Access: You are not authorized..." ## Test plan - [ ] User without AI access sees only one error notification (the unauthorized message) - [ ] Non-auth errors still show the generic "Failed to generate SQL query" message - [ ] Auth errors don't trigger SearchBar error handling via re-throw 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>