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

Improve error handling #37

Open
bscriver123 opened this issue Jan 10, 2025 · 0 comments · May be fixed by #38
Open

Improve error handling #37

bscriver123 opened this issue Jan 10, 2025 · 0 comments · May be fixed by #38

Comments

@bscriver123
Copy link
Contributor

I constantly get this error due to an external API error. Gracefully handle the error.

Traceback (most recent call last):

  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code

  File "/home/ubuntu/minimal-provider-open-hands/src/solve_instances_process.py", line 39, in <module>
    main()
    └ <function main at 0x7e7d8cfbbd80>

> File "/home/ubuntu/minimal-provider-open-hands/src/solve_instances_process.py", line 26, in main
    solve_instances_handler()
    └ <function solve_instances_handler at 0x7e7d89966020>

  File "/home/ubuntu/minimal-provider-open-hands/src/solve_instances.py", line 231, in solve_instances_handler
    instance_to_solve = _get_instance_to_solve(p["instance_id"], SETTINGS)
                        │                      │                 └ Settings(foundation_model_name=<ModelName.bedrock_claude_v2: 'bedrock-claude-v2'>, openai_api_key='XXX...
                        │                      └ {'id': 'a30bebfa-f0f6-4e01-985c-4dc03e964ecf', 'instance_id': '1b4135ea-bb4e-4ef0-93b7-4e2f4a0285fe', 'max_bid': 0.02, 'statu...
                        └ <function _get_instance_to_solve at 0x7e7d89a3bba0>

  File "/home/ubuntu/minimal-provider-open-hands/src/solve_instances.py", line 38, in _get_instance_to_solve
    if instance["status"] != settings.market_resolved_instance_code:
       │                     │        └ 3
       │                     └ Settings(foundation_model_name=<ModelName.bedrock_claude_v2: 'bedrock-claude-v2'>, openai_api_key='XXX
       └ {'detail': 'Authentication Error: Failed to authenticate.'}

KeyError: 'status'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant