Skip to content

fix: Handle WebSocket errors and subscription failures#390

Merged
bishoy-at-pieces merged 2 commits intomainfrom
ask-stream-error-handling
Aug 11, 2025
Merged

fix: Handle WebSocket errors and subscription failures#390
bishoy-at-pieces merged 2 commits intomainfrom
ask-stream-error-handling

Conversation

@bishoy-at-pieces
Copy link
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings July 31, 2025 15:17
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses WebSocket error handling and subscription failures in the Pieces copilot functionality. It improves error messaging for failed model subscriptions and adds WebSocket error logging capabilities.

  • Adds proper error handling for "FAILED" status responses with specific messaging for subscription requirements
  • Implements WebSocket error callback to capture and log connection issues
  • Sets model name from configuration during startup to ensure proper model context

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/pieces/settings.py Removes unused imports and adds model name initialization during startup
src/pieces/copilot/ask_command.py Adds error handling for failed responses and WebSocket connection errors

Copy link
Contributor

@tsavo-at-pieces tsavo-at-pieces left a comment

Choose a reason for hiding this comment

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

Have you addressed the GitHub Copilot Review Comments?

@bishoy-at-pieces
Copy link
Collaborator Author

mb those was debugging prints

Copy link
Contributor

@tsavo-at-pieces tsavo-at-pieces left a comment

Choose a reason for hiding this comment

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

This is lookin solid. Thank you @bishoy-at-pieces !

@tsavo-at-pieces tsavo-at-pieces self-requested a review August 11, 2025 15:35
@bishoy-at-pieces bishoy-at-pieces merged commit 04a81be into main Aug 11, 2025
7 checks passed
@bishoy-at-pieces bishoy-at-pieces deleted the ask-stream-error-handling branch August 11, 2025 15:35
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.

I can switch to paid subscription models without having an actual subscription

3 participants