Skip to content

Commit

Permalink
[#24] Added error logging and response.
Browse files Browse the repository at this point in the history
  • Loading branch information
mernst committed Nov 20, 2024
1 parent c1eab21 commit 74bc4b0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions api/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,16 @@
$job_json = cdmlight_transformation($job_json,$transformation_json);
else{
//ToDo error: unsupported engine
//remove directory?
//
error_log("Invocation of an unsupported engine: ".$transformation_json["version"]["engine"]." for transformation ".$transformation_json["version"]["transformation_id"]." version ".$transformation_json["version"]["version_id"])." in job ".$job_id;
header('Content-Type: application/json; charset=utf-8');
http_response_code (501);
$output = array();
$output["error_code"] = 501;
$output["error_message"] = "Engine not implemented";
echo json_encode($output);
return;
//remove directory
//rrmdir("results/".$job_id);
}

// Remove tmp folder
Expand Down
2 changes: 1 addition & 1 deletion config.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

# Available services
$services = array('transformations', 'transform');
$services = array('transformations', 'transform', 'results');

?>

0 comments on commit 74bc4b0

Please sign in to comment.