Return 404 on missing timeseries
This commit is contained in:
parent
f8d0e84097
commit
b2c874b4a6
5
app.py
5
app.py
|
@ -38,7 +38,10 @@ def report():
|
||||||
|
|
||||||
@app.route("/ts/<id>")
|
@app.route("/ts/<id>")
|
||||||
def get_timeseries(id):
|
def get_timeseries(id):
|
||||||
ts = LTS(id=id)
|
try:
|
||||||
|
ts = LTS(id=id)
|
||||||
|
except FileNotFoundError:
|
||||||
|
abort(404)
|
||||||
return jsonify({"description": ts.description, "data": ts.data})
|
return jsonify({"description": ts.description, "data": ts.data})
|
||||||
|
|
||||||
def verify_node(d):
|
def verify_node(d):
|
||||||
|
|
Loading…
Reference in New Issue