[MXS-2200] Setting a static variable via maxctrl gives a non accurate error message "Unknown global parameter" Created: 2018-11-29  Updated: 2019-01-04  Resolved: 2019-01-04

Status: Closed
Project: MariaDB MaxScale
Component/s: maxctrl, REST-API
Affects Version/s: 2.3
Fix Version/s: 2.3.3

Type: Bug Priority: Minor
Reporter: Claudio Nanni Assignee: markus makela
Resolution: Fixed Votes: 0
Labels: None


 Description   

I think an existing but static variable should give a different error when tried to be set dynamically, what we have now is:

$ maxctrl -u user1 -p 123 -h 127.0.0.1:8989 alter maxscale log_augmentation 1
Error: Server at 127.0.0.1:8989 responded with status code 403 to `PATCH maxscale`:{
    "errors": [
        {
            "detail": "Unknown global parameter: log_augmentation=1"
        }
    ]
}

Same message as with a totally non-existing parameter:

$ maxctrl -u user1 -p 123 -h 127.0.0.1:8989 alter maxscale something_random 123
Error: Server at 127.0.0.1:8989 responded with status code 403 to `PATCH maxscale`:{
    "errors": [
        {
            "detail": "Unknown global parameter: something_random=123"
        }
    ]
}

Also error message perhaps could be formatted better, e.g.:

Error: Server at 127.0.0.1:8989   Code 403 : "Unknown global parameter: something_random=123"


Generated at Thu Feb 08 04:12:24 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.