This is an automated email from the ASF dual-hosted git repository.

rkk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-nexus.git


The following commit(s) were added to refs/heads/master by this push:
     new 6f220d2  Execution not found status code 404 (#274)
6f220d2 is described below

commit 6f220d248b9853cab6a531078444668d911eeb6a
Author: Riley Kuttruff <[email protected]>
AuthorDate: Wed Sep 6 10:47:43 2023 -0700

    Execution not found status code 404 (#274)
    
    * Update ResultsStorage.py
    
    Returns code 404 if no matching execution found
    
    * Update CHANGELOG.md
---
 CHANGELOG.md                                          | 1 +
 analysis/webservice/algorithms/doms/ResultsStorage.py | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4c5cb88..0346db7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -27,6 +27,7 @@ and this project adheres to [Semantic 
Versioning](https://semver.org/spec/v2.0.0
 ### Fixed
 - SDAP-474: Fixed bug in CSV attributes where secondary dataset would be 
rendered as comma separated characters
 - SDAP-475: Bug fixes for `/timeSeriesSpark` and `/timeAvgMapSpark`
+- Status code for results endpoint if execution id is not found fixed to be 
`404` instead of `500`.
 ### Security
 
 ## [1.1.0] - 2023-04-26
diff --git a/analysis/webservice/algorithms/doms/ResultsStorage.py 
b/analysis/webservice/algorithms/doms/ResultsStorage.py
index 6b210c0..a183859 100644
--- a/analysis/webservice/algorithms/doms/ResultsStorage.py
+++ b/analysis/webservice/algorithms/doms/ResultsStorage.py
@@ -401,4 +401,4 @@ class ResultsRetrieval(AbstractResultsContainer):
                 'timeStarted': row.time_started
             }
 
-        raise ValueError('Execution not found with id %s', execution_id)
+        raise NexusProcessingException(reason=f'Execution not found with id 
{str(execution_id)}', code=404)

Reply via email to