Skip to content

Fix truncated error toast messages and expand image URL detection (#283, #253)#381

Open
srimon12 wants to merge 3 commits into
qdrant:masterfrom
srimon12:fix/error-messages-and-image-urls
Open

Fix truncated error toast messages and expand image URL detection (#283, #253)#381
srimon12 wants to merge 3 commits into
qdrant:masterfrom
srimon12:fix/error-messages-and-image-urls

Conversation

@srimon12
Copy link
Copy Markdown

@srimon12 srimon12 commented May 15, 2026

Summary

Fixes #283
Fixes #253

Two bug fixes for the Web UI:

1. Truncated error messages (#283)

  • Added message truncation at 250 characters with "..." suffix in ErrorNotifier to prevent long API error messages from overflowing the toast notification
  • Improved getErrorMessage() fallback: when the extracted message is empty or whitespace-only, it now falls back to the generic fallback message instead of showing an empty toast

2. Image URL detection (#253)

  • Fixed the image URL regex to support URLs with query strings and fragments (e.g., image.png?w=200, photo.jpeg#fragment)
  • Added support for additional image formats: bmp, ico, tiff, tif, avif, heic, heif
  • Added support for data:image/... URIs

Files Changed

  • src/components/ToastNotifications/ErrorNotifier.jsx — +14/-3
  • src/lib/get-error-message.js — +6/-1
  • src/components/Points/PointImage.jsx — +7/-1

Verification

  • 123/123 tests pass, no lint errors
  • Image URL regex validated against 19 test cases (all pass), including query strings, fragments, data URIs, and new formats
  • Error truncation verified in browser: short messages pass through unchanged, long messages truncated at 250 chars

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.

Truncated error message in notification toast Bug: Not all image URLs are supported

1 participant