mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-21 22:48:44 +00:00
Merge branch 'feature/CTLE-433-cart-rover-now-extensiv-integration' into integration/sprint-26
This commit is contained in:
@ -59,6 +59,7 @@ import com.kingsrook.qqq.backend.core.actions.values.SearchPossibleValueSourceAc
|
||||
import com.kingsrook.qqq.backend.core.adapters.QInstanceAdapter;
|
||||
import com.kingsrook.qqq.backend.core.context.QContext;
|
||||
import com.kingsrook.qqq.backend.core.exceptions.QAuthenticationException;
|
||||
import com.kingsrook.qqq.backend.core.exceptions.QBadRequestException;
|
||||
import com.kingsrook.qqq.backend.core.exceptions.QException;
|
||||
import com.kingsrook.qqq.backend.core.exceptions.QInstanceValidationException;
|
||||
import com.kingsrook.qqq.backend.core.exceptions.QModuleDispatchException;
|
||||
@ -1634,6 +1635,11 @@ public class QJavalinImplementation
|
||||
statusCode = Objects.requireNonNullElse(statusCode, HttpStatus.Code.NOT_FOUND); // 404
|
||||
respondWithError(context, statusCode, userFacingException.getMessage());
|
||||
}
|
||||
else if(userFacingException instanceof QBadRequestException)
|
||||
{
|
||||
statusCode = Objects.requireNonNullElse(statusCode, HttpStatus.Code.BAD_REQUEST); // 400
|
||||
respondWithError(context, statusCode, userFacingException.getMessage());
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG.info("User-facing exception", e);
|
||||
|
@ -50,6 +50,7 @@ import com.kingsrook.qqq.backend.core.actions.processes.RunProcessAction;
|
||||
import com.kingsrook.qqq.backend.core.actions.reporting.GenerateReportAction;
|
||||
import com.kingsrook.qqq.backend.core.actions.tables.InsertAction;
|
||||
import com.kingsrook.qqq.backend.core.actions.values.QValueFormatter;
|
||||
import com.kingsrook.qqq.backend.core.exceptions.QBadRequestException;
|
||||
import com.kingsrook.qqq.backend.core.exceptions.QNotFoundException;
|
||||
import com.kingsrook.qqq.backend.core.exceptions.QPermissionDeniedException;
|
||||
import com.kingsrook.qqq.backend.core.exceptions.QUserFacingException;
|
||||
@ -280,7 +281,13 @@ public class QJavalinProcessHandler
|
||||
QJavalinImplementation.setupSession(context, new AbstractActionInput());
|
||||
// todo context.contentType(reportFormat.getMimeType());
|
||||
context.header("Content-Disposition", "filename=" + context.pathParam("file"));
|
||||
context.result(new FileInputStream(context.queryParam("filePath")));
|
||||
|
||||
String filePath = context.queryParam("filePath");
|
||||
if(filePath == null)
|
||||
{
|
||||
throw (new QBadRequestException("A filePath was not provided."));
|
||||
}
|
||||
context.result(new FileInputStream(filePath));
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
|
@ -143,7 +143,7 @@ public class QJavalinScriptsHandler
|
||||
QTableMetaData scriptTable = QContext.getQInstance().getTable(Script.TABLE_NAME);
|
||||
if(scriptTypeTable != null && scriptTable != null && scriptRevisionTable != null)
|
||||
{
|
||||
Map<Serializable, QRecord> scriptTypeMap = GeneralProcessUtils.loadTableToMap(getInput, ScriptType.TABLE_NAME, "id");
|
||||
Map<Serializable, QRecord> scriptTypeMap = GeneralProcessUtils.loadTableToMap(ScriptType.TABLE_NAME, "id");
|
||||
|
||||
///////////////////////////////////////////////////////
|
||||
// process each associated script type for the table //
|
||||
@ -259,7 +259,7 @@ public class QJavalinScriptsHandler
|
||||
|
||||
if(CollectionUtils.nullSafeHasContents(queryOutput.getRecords()))
|
||||
{
|
||||
GeneralProcessUtils.addForeignRecordsListToRecordList(queryInput, queryOutput.getRecords(), "id", "scriptLogLine", "scriptLogId");
|
||||
GeneralProcessUtils.addForeignRecordsListToRecordList(queryOutput.getRecords(), "id", "scriptLogLine", "scriptLogId");
|
||||
}
|
||||
|
||||
Map<String, Serializable> rs = new HashMap<>();
|
||||
|
Reference in New Issue
Block a user