Files
openobserve/web/src
Neha PandClaude Opus 4.7 92c766f9a3 fix: prevent duplicate error notification on auth failure in NL query (#12592)
## 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>
2026-06-11 07:20:12 +00:00
..
2026-05-28 11:00:49 +00:00
2026-06-11 12:59:57 +05:30
2026-05-28 11:00:49 +00:00
2026-06-11 12:59:57 +05:30
2026-06-11 12:59:57 +05:30
2026-06-11 12:59:57 +05:30
2025-12-05 15:43:51 +05:30
2026-05-28 11:00:49 +00:00