holmesgpt icon indicating copy to clipboard operation
holmesgpt copied to clipboard

Improve error messages for config errors

Open pavangudiwada opened this issue 8 months ago • 0 comments

If you don't have an OpenAI API key defined in the config.yaml holmes crashes with this error. I think it should show users a proper error that the key is missing.

╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ in ask:137                                                                                       │
│                                                                                                  │
│ in load_from_file:210                                                                            │
│                                                                                                  │
│ in load_model_from_file:41                                                                       │
│                                                                                                  │
│ in __init__:55                                                                                   │
│                                                                                                  │
│ in __init__:11                                                                                   │
│                                                                                                  │
│ in __init__:11                                                                                   │
│                                                                                                  │
│ in __init__:8                                                                                    │
│                                                                                                  │
│ in __init__:20                                                                                   │
│                                                                                                  │
│ in _decode_init:31                                                                               │
│                                                                                                  │
│ in _decode:53                                                                                    │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ValueError: Invalid data type: <class 'NoneType'>, expected dict or list.
[32275] Failed to execute script 'holmes' due to unhandled exception!

Tested on Fedora Linux 40 (Workstation Edition)

pavangudiwada avatar Jun 09 '24 12:06 pavangudiwada