Skip to content

Fixing indirect prompt injection ui#21

Merged
preetkaran20 merged 1 commit into
mainfrom
rag_poision
May 23, 2026
Merged

Fixing indirect prompt injection ui#21
preetkaran20 merged 1 commit into
mainfrom
rag_poision

Conversation

@preetkaran20
Copy link
Copy Markdown
Member

@preetkaran20 preetkaran20 commented May 23, 2026

Summary by CodeRabbit

  • Bug Fixes
    • Improved error message display for failed requests. The application now correctly prioritizes and displays error details when certain operations fail.

Review Change Stack

@preetkaran20 preetkaran20 merged commit eb06cf7 into main May 23, 2026
1 check was pending
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 23, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 342072eb-a491-4432-afd1-d1cc9f4773fd

📥 Commits

Reviewing files that changed from the base of the PR and between 4182a52 and 0de6dc1.

📒 Files selected for processing (1)
  • src/static/facade/indirect_prompt_injection_template.js

📝 Walkthrough

Walkthrough

The PR updates the responseMessage helper function to prioritize data.error field when present as a non-empty string, checking it before existing data.message and data.detail fallbacks. This affects error message display in failed runPayload and verifySecret request handlers.

Changes

Error Message Prioritization

Layer / File(s) Summary
responseMessage error field priority
src/static/facade/indirect_prompt_injection_template.js
Add conditional check to return data.error when it is a non-empty string before falling back to data.message or data.detail in the response message helper.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

In error's field, a rabbit hops with glee,
Reorder the checks—let priority be,
First the error speaks, loud and clear,
No fallback needed when truth is near! 🐰✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch rag_poision

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

🎉 Thanks for contributing @preetkaran20!
We’d love to stay in touch and grow SasanLabs 🚀
👉 Please fill this (takes 30 sec):
https://docs.google.com/forms/d/e/1FAIpQLSfwWVdnULUhtfruA-DN328NwKnBGebaWg9U5y0xivLLxxoMog/viewform?usp=pp_url&entry.1414771947=preetkaran20
Also consider ⭐ starring the repo if you like it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant