Skip to content

Fix missing None-check in get_conversations #8927

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 5, 2025
Merged

Conversation

raymyers
Copy link
Contributor

@raymyers raymyers commented Jun 5, 2025

  • This change is worth documenting at https://docs.all-hands.dev/
  • Include this change in the Release Notes. If checked, you must provide an end-user friendly description for your change below

End-user friendly description of the problem this fixes or functionality this introduces.


Summarize what the PR does, explaining any non-trivial design decisions.

Handle the case were get_conversation gets None from attach_conversation, it should be an HTTP 404, currently it's passing it into detach_conversation causing 500s and this runtime exception:

openhands/server/conversation_manager/standalone_conversation_manager.py", line 136, in detach_from_conversation
    sid = conversation.sid
          ^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'sid'

Also added a missing await on call to an async conversation_manager function.


Link of any specific issues this addresses:


To run this PR locally, use the following command:

docker run -it --rm   -p 3000:3000   -v /var/run/docker.sock:/var/run/docker.sock   --add-host host.docker.internal:host-gateway   -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:02987b1-nikolaik   --name openhands-app-02987b1   docker.all-hands.dev/all-hands-ai/openhands:02987b1

@raymyers raymyers requested a review from tofarr June 5, 2025 18:36
Copy link
Collaborator

@tofarr tofarr left a comment

Choose a reason for hiding this comment

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

🍰

@raymyers raymyers enabled auto-merge (squash) June 5, 2025 18:41
@raymyers raymyers merged commit afd8ee6 into main Jun 5, 2025
18 of 19 checks passed
@raymyers raymyers deleted the ray/util-convo-404 branch June 5, 2025 18:55
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.

2 participants