File tree Expand file tree Collapse file tree
src/binaries/sakura/src/api/http_endpoints/model/task Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020- support other namespaces thand "default"
2121- support for multiple sakura instances
2222- validation for task-input to avoid a mismatch between given input and the model
23+ - validation for task-input to avoid a mismatch between given input and the dataset
2324- dashboard:
2425 - added error-popups
2526 - validation of input-fields and error-message for invalid inputs
Original file line number Diff line number Diff line change @@ -306,6 +306,15 @@ async fn handle_input(
306306 . await
307307 . map_err ( map_ainari_error_to_api_response) ?;
308308
309+ // check if requested column even exist in the dataset
310+ if !dataset_resp. column_names . contains ( & input. dataset_column ) {
311+ let msg = format ! (
312+ "Dataset-column with name '{}' doesn't exist in dataset with UUID '{}'" ,
313+ input. dataset_column, input. dataset_uuid
314+ ) ;
315+ return Err ( ErrorResponse :: BadRequest ( msg) ) ;
316+ }
317+
309318 // create temp-file-paths
310319 let local_file_path = format ! ( "{}/{}" , temp_dir, dataset_resp. uuid) ;
311320 let local_encrypted_file_path = format ! ( "{local_file_path}_encrypted" ) ;
You can’t perform that action at this time.
0 commit comments