fix error message for non-existing database

This commit is contained in:
Sarah Hoffmann
2022-12-07 20:05:24 +01:00
parent 9d31a67116
commit 93b9288c30
7 changed files with 26 additions and 6 deletions

View File

@@ -18,7 +18,10 @@ create = FormatDispatcher()
@create.format_func(StatusResult, 'text')
def _format_status_text(result: StatusResult) -> str:
return result.message
if result.status:
return f"ERROR: {result.message}"
return 'OK'
@create.format_func(StatusResult, 'json')