Skip to content
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

Fix internal server error display in frontend #7699

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

xingyaoww
Copy link
Collaborator

@xingyaoww xingyaoww commented Apr 3, 2025

  • 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 that this introduces.
This PR fixes an issue where internal server error messages were displaying the raw translation key (e.g., STATUS$ERROR_LLM_INTERNAL_SERVER_ERROR) instead of the actual translated error message. Users will now see properly formatted error messages when internal server errors occur.


Give a summary of what the PR does, explaining any non-trivial design decisions.
The PR makes the following changes:

  1. Modified the ExpandableMessage component to properly handle translation keys in message content
  2. Added proper detection of translation keys in error messages
  3. Added test for translation key handling

These changes ensure that error messages are properly translated and displayed to users without unnecessary UI elements or showing raw translation keys.


Link of any specific issues this addresses.
N/A


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:e56cb85-nikolaik   --name openhands-app-e56cb85   docker.all-hands.dev/all-hands-ai/openhands:e56cb85

@xingyaoww xingyaoww marked this pull request as draft April 3, 2025 22:44
This commit fixes an issue where internal server error messages were displaying the translation key (e.g., STATUS) instead of the actual translated error message.

Changes:
1. Modified ExpandableMessage component to properly handle translation keys in message content
2. Added proper detection of translation keys
3. Hides the expand/collapse arrow when there are no details to show
4. Added test for translation key handling
@xingyaoww xingyaoww force-pushed the fix-internal-server-error-display branch from 8e0ff07 to e422a3d Compare April 3, 2025 22:49
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