From 93596fdc374b6b1182040445c3c2bd4de038e922 Mon Sep 17 00:00:00 2001 From: chin Date: Thu, 27 Apr 2023 22:45:51 +0800 Subject: [PATCH] fix: wado retrieve not exist instance must be 404 - {@link https://dicom.nema.org/medical/dicom/current/output/html/part18.html#table_9.4.3-1}fix: wado - {@link https://dicom.nema.org/medical/dicom/current/output/html/part18.html#table_10.4.3-1} --- api/WADO-URI/service/WADO-URI.service.js | 4 ++-- api/dicom-web/controller/WADO-RS/rendered/series.js | 2 +- api/dicom-web/controller/WADO-RS/rendered/study.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/WADO-URI/service/WADO-URI.service.js b/api/WADO-URI/service/WADO-URI.service.js index 0a376fee..c6756de0 100644 --- a/api/WADO-URI/service/WADO-URI.service.js +++ b/api/WADO-URI/service/WADO-URI.service.js @@ -32,7 +32,7 @@ class WadoUriService { } catch (e) { if (e instanceof NotFoundInstanceError) { - this.response.writeHead(204, { + this.response.writeHead(404, { "Content-Type": "application/dicom+json" }); return this.response.end(); @@ -55,7 +55,7 @@ class WadoUriService { if (e instanceof NotFoundInstanceError) { - this.response.writeHead(204, { + this.response.writeHead(404, { "Content-Type": "application/dicom+json" }); return this.response.end(); diff --git a/api/dicom-web/controller/WADO-RS/rendered/series.js b/api/dicom-web/controller/WADO-RS/rendered/series.js index 397ee86a..4d3a7be4 100644 --- a/api/dicom-web/controller/WADO-RS/rendered/series.js +++ b/api/dicom-web/controller/WADO-RS/rendered/series.js @@ -36,7 +36,7 @@ class RetrieveRenderedSeriesController extends Controller { } multipartWriter.writeFinalBoundary(); } else { - this.response.writeHead(204, { + this.response.writeHead(404, { "content-type": "application/dicom+json" }); } diff --git a/api/dicom-web/controller/WADO-RS/rendered/study.js b/api/dicom-web/controller/WADO-RS/rendered/study.js index b475efe6..46b2d88e 100644 --- a/api/dicom-web/controller/WADO-RS/rendered/study.js +++ b/api/dicom-web/controller/WADO-RS/rendered/study.js @@ -40,7 +40,7 @@ class RetrieveRenderedStudyController extends Controller { } multipartWriter.writeFinalBoundary(); } else { - this.response.writeHead(204, { + this.response.writeHead(404, { "content-type": "application/dicom+json" }); }