Page MenuHomeVyOS Platform

HTTPS-API delete key without id error
Closed, ResolvedPublicBUG

Description

Delete key without id error/incorrect check

set service https api keys id foo key '12345'
commit
del service https api keys id foo key
commit

commit:

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/http-api.py", line 145, in <module>
    c = get_config()
        ^^^^^^^^^^^^
  File "/usr/libexec/vyos/conf_mode/http-api.py", line 83, in get_config
    key = api_dict['keys']['id'][el]['key']
          ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^
KeyError: 'key'



[[service https api]] failed
Commit failed

Details

Version
VyOS 1.4-rolling-202302240317
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)