summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2010-05-04 10:13:52 +0200
committerChristoph Helma <helma@in-silico.ch>2010-05-04 10:13:52 +0200
commite6750fc8658df273dabc39db4a5b72731050e6c1 (patch)
treea9bd2df5719ec0274c7389fdd0d6bda8b75f1814
parent7821b0e7c7d97a60b881afff67e557426256eac6 (diff)
404 error for empty datasets
-rw-r--r--application.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/application.rb b/application.rb
index 2e56233..b2d872c 100644
--- a/application.rb
+++ b/application.rb
@@ -61,6 +61,7 @@ get '/:id' do
LOGGER.warn e.backtrace
halt 404, "Dataset #{params[:id]} not found."
end
+ halt 404, "Dataset #{params[:id]} not found." if dataset.nil? # not sure how an empty cataset can be returned, but if this happens stale processes keep runing at 100% cpo
case accept
when /rdf/ # redland sends text/rdf instead of application/rdf+xml
response['Content-Type'] = 'application/rdf+xml'