CTLE-421: added reveal adornment, warnings on child record insert failures

This commit is contained in:
Tim Chamberlain
2023-05-02 10:12:55 -05:00
parent 2832566dbd
commit 83e628d2d6
7 changed files with 82 additions and 6 deletions

View File

@ -687,6 +687,10 @@ public class QJavalinImplementation
{
throw (new QUserFacingException("Error inserting " + qInstance.getTable(tableName).getLabel() + ": " + insertOutput.getRecords().get(0).getErrors().get(0)));
}
if(CollectionUtils.nullSafeHasContents(insertOutput.getRecords().get(0).getWarnings()))
{
throw (new QUserFacingException("Warning inserting " + qInstance.getTable(tableName).getLabel() + ": " + insertOutput.getRecords().get(0).getWarnings().get(0)));
}
QJavalinAccessLogger.logEndSuccess(logPair("primaryKey", () -> (insertOutput.getRecords().get(0).getValue(qInstance.getTable(tableName).getPrimaryKeyField()))));
context.result(JsonUtils.toJson(insertOutput));