Actions
Bug #21926
closedError when trying to set default value without quotes for 404 error
Pull Request:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
To do
Regression:
No
Description
When we chose to set a default value when there is 404 error, if you chose to put a string without quotes (I.e toto
) , an exception is raised.
[2022-08-09 23:43:48+0200] ERROR net.liftweb.http.LiftRules - Exception being returned to browser when processing /secure/api/datasources net.liftweb.json.JsonParser$ParseException: expected boolean Near: tot at net.liftweb.json.JsonParser$Parser.fail(JsonParser.scala:285) at net.liftweb.json.JsonParser$Parser.nextToken(JsonParser.scala:352) at net.liftweb.json.JsonParser$.$anonfun$astParser$1(JsonParser.scala:227) at net.liftweb.json.JsonParser$.parse(JsonParser.scala:82) at net.liftweb.json.JsonParser$.parse(JsonParser.scala:47) at net.liftweb.json.package$.parse(package.scala:40) at com.normation.plugins.datasources.DataSourceJsonSerializer$.serialize(Serialization.scala:103) at com.normation.plugins.datasources.DataSourceJdbcRepository.save(Repository.scala:418) at com.normation.plugins.datasources.DataSourceRepoImpl.save(Repository.scala:274) at com.normation.plugins.datasources.api.DataSourceApiImpl$CreateDataSource$.$anonfun$process0$8(DataSourceApiImpl.scala:270) at net.liftweb.common.Full.flatMap(Box.scala:858) at com.normation.plugins.datasources.api.DataSourceApiImpl$CreateDataSource$.$anonfun$process0$7(DataSourceApiImpl.scala:269) at net.liftweb.common.Full.flatMap(Box.scala:858)
With double quotes (I.e "toto") everything is working fine
Actions