hermes - ✅(Solved) Fix Bug: Web server returns 500 error when skills configuration returns None [2 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#15486Fetched 2026-04-26 05:27:09
View on GitHub
Comments
1
Participants
2
Timeline
8
Reactions
0
Timeline (top)
labeled ×3cross-referenced ×2commented ×1referenced ×1

Error Message

The web server intermittently returns a 500 Internal Server Error when accessing the skills configuration endpoint.

  • Implement robust error handling in hermes_cli/web_server.py for the /api/skills endpoint to prevent a single configuration failure from crashing the entire service.

Fix Action

Fixed

PR fix notes

PR #15501: fix: handle None skills config in skills_config helpers

Description (problem / solution / changelog)

When skills is set to None in config.yaml, get_disabled_skills() crashes with AttributeError: 'NoneType' object has no attribute 'get', and save_disabled_skills() would overwrite the key with a dict without preserving the user's intent.

Changes:

  • get_disabled_skills: use or {} / or [] guards so None is treated the same as an absent key
  • save_disabled_skills: replace config.setdefault("skills", {}) with an isinstance check so a non-dict value (including None) is replaced rather than silently kept

All 28 existing tests in test_skills_config.py pass; web-server skill endpoint tests also pass.

Closes #15486

Changed files

  • hermes_cli/skills_config.py (modified, +5/-4)

PR #15684: fix: handle exceptions in /api/skills endpoint (#15486)

Description (problem / solution / changelog)

Problem

The /api/skills endpoint calls _find_all_skills() without a try/except. If skill discovery raises (corrupted skills directory, permission error, etc.), the endpoint returns a 500 Internal Server Error with no useful error message.

Fix

Wrap the _find_all_skills() call in a try/except block and return an empty list on failure. This matches the pattern used by _list_all_skills() in skills_config.py which already handles exceptions gracefully.

Before vs After

ScenarioBeforeAfter
Skills dir has bad permissions500 Internal Server Error[] (empty list)
Corrupted skill file500 Internal Server Error[] (empty list)

Fixes NousResearch/hermes-agent#15486

Changed files

  • hermes_cli/web_server.py (modified, +4/-1)
RAW_BUFFERClick to expand / collapse

Problem

The web server intermittently returns a 500 Internal Server Error when accessing the skills configuration endpoint.

Symptoms

  • The /api/skills endpoint crashes the request cycle.
  • Logs indicate NoneType errors when attempting to access nested keys in the skills configuration.

Suspected Cause

The current implementation of get_disabled_skills() in hermes_cli/skills_config.py does not gracefully handle cases where certain configuration keys are missing or explicitly set to None. This leads to NoneType exceptions during attribute or item access.

Proposed Fix/Goal

  • Ensure all configuration lookups in skills_config.py use safe defaults (e.g., or {} or or []).
  • Implement robust error handling in hermes_cli/web_server.py for the /api/skills endpoint to prevent a single configuration failure from crashing the entire service.

Note: This issue is being tracked to validate the current fix approach and ensure long-term stability.

extent analysis

TL;DR

Update the get_disabled_skills() function in hermes_cli/skills_config.py to handle missing configuration keys and implement robust error handling in hermes_cli/web_server.py for the /api/skills endpoint.

Guidance

  • Review the get_disabled_skills() function to ensure it uses safe defaults (e.g., or {} or or []) when accessing nested configuration keys.
  • Implement try-except blocks in hermes_cli/web_server.py to catch and handle NoneType exceptions for the /api/skills endpoint, preventing the service from crashing.
  • Verify the fix by testing the endpoint with various configuration scenarios, including missing or None values.
  • Consider adding logging to track and monitor configuration-related errors for future debugging and maintenance.

Example

def get_disabled_skills(config):
    disabled_skills = config.get('disabled_skills', [])
    # Use safe defaults to avoid NoneType errors
    return disabled_skills or []

Notes

The proposed fix approach seems reasonable, but thorough testing is necessary to ensure long-term stability. Additionally, reviewing the entire skills_config.py file for similar potential issues may be beneficial.

Recommendation

Apply the proposed workaround by updating the get_disabled_skills() function and implementing robust error handling in hermes_cli/web_server.py, as this approach directly addresses the identified cause of the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - ✅(Solved) Fix Bug: Web server returns 500 error when skills configuration returns None [2 pull requests, 1 comments, 2 participants]