mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-27 15:45:56 -05:00
add helpful error messages for onblur validation
This commit is contained in:
parent
7d172fbb54
commit
f9a3b37583
@ -134,7 +134,22 @@ void xml_set_config(WS_CONNINFO *pwsc) {
|
||||
|
||||
if((err=conf_set_string(section,key,value,verify_only)!=CONF_E_SUCCESS)) {
|
||||
/* should return text error from conf_ */
|
||||
switch(err) {
|
||||
case CONF_E_BADELEMENT:
|
||||
xml_return_error(pwsc,500,"Unknown section/key pair");
|
||||
break;
|
||||
case CONF_E_PATHEXPECTED:
|
||||
xml_return_error(pwsc,500,"Expecting valid path");
|
||||
break;
|
||||
case CONF_E_INTEXPECTED:
|
||||
xml_return_error(pwsc,500,"Expecting integer value");
|
||||
break;
|
||||
case CONF_E_NOTWRITABLE:
|
||||
xml_return_error(pwsc,500,"Config file not writable");
|
||||
break;
|
||||
default:
|
||||
xml_return_error(pwsc,500,"conf_set_string: error");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user