Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion backend/onyx/background/celery/tasks/indexing/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,11 @@ def connector_indexing_task(
f"cc_pair={cc_pair_id} "
f"search_settings={search_settings_id}"
)
raise e

# special bulletproofing ... truncate long exception messages
sanitized_e = type(e)(str(e)[:1024])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be good to turn this into a utility for the future

sanitized_e.__traceback__ = e.__traceback__
raise sanitized_e

finally:
if lock.owned():
Expand Down
4 changes: 3 additions & 1 deletion backend/onyx/connectors/slack/connector.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import contextvars
import copy
import itertools
import re
from collections.abc import Callable
from collections.abc import Generator
Expand Down Expand Up @@ -292,7 +293,8 @@ def filter_channels(
if channel not in all_channel_names:
raise ValueError(
f"Channel '{channel}' not found in workspace. "
f"Available channels: {all_channel_names}"
f"Available channels (max 50 of {len(all_channel_names)} shown): "
f"{[itertools.islice(all_channel_names, 50)]}"
)

return [
Expand Down
Loading