Skip to content
Snippets Groups Projects
  • Markus Armbruster's avatar
    8e26ae7b
    authz-list-file: Improve an error message · 8e26ae7b
    Markus Armbruster authored
    
    When qauthz_list_file_load() rejects JSON values other than JSON
    object with a rather confusing error message:
    
        $ echo 1 | qemu-system-x86_64 -nodefaults -S -display none  -object authz-list-file,id=authz0,filename=/dev/stdin
        qemu-system-x86_64: -object authz-list-file,id=authz0,filename=/dev/stdin: Invalid parameter type for 'obj', expected: dict
    
    Improve to
    
        qemu-system-x86_64: -object authz-list-file,id=authz0,filename=/dev/stdin: File '/dev/stdin' must contain a JSON object
    
    Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
    Signed-off-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
    8e26ae7b
    History
    authz-list-file: Improve an error message
    Markus Armbruster authored
    
    When qauthz_list_file_load() rejects JSON values other than JSON
    object with a rather confusing error message:
    
        $ echo 1 | qemu-system-x86_64 -nodefaults -S -display none  -object authz-list-file,id=authz0,filename=/dev/stdin
        qemu-system-x86_64: -object authz-list-file,id=authz0,filename=/dev/stdin: Invalid parameter type for 'obj', expected: dict
    
    Improve to
    
        qemu-system-x86_64: -object authz-list-file,id=authz0,filename=/dev/stdin: File '/dev/stdin' must contain a JSON object
    
    Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
    Signed-off-by: default avatarDaniel P. Berrangé <berrange@redhat.com>