Skip to content

Commit bbb1f71

Browse files
Add attribute to fallback server for setting HTML code
1 parent 5387c97 commit bbb1f71

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/labthings_fastapi/server/fallback.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ def __init__(self, *args, **kwargs):
1212
self.labthings_server = None
1313
self.labthings_error = None
1414
self.log_history = None
15+
self.html_code = 500
1516

1617

1718
app = FallbackApp()
@@ -71,7 +72,7 @@ async def root():
7172
logging_info = f" <p>Logging info</p>\n <pre>{app.log_history}</pre>"
7273

7374
content = content.replace("{{logginginfo}}", logging_info)
74-
return HTMLResponse(content=content, status_code=218)
75+
return HTMLResponse(content=content, status_code=app.html_code)
7576

7677

7778
@app.get("/{path:path}")

0 commit comments

Comments
 (0)