fix: Improve submit error handling on API and refactor client with async/await

Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
2025-11-21 23:02:29 +00:00
parent 7b84573dd8
commit 3acaf230c4
2 changed files with 20 additions and 26 deletions

View File

@@ -128,7 +128,7 @@ def submit():
else:
raise Exception('Invalid article')
except BaseException as e:
except Exception as e:
logging.error('Problem with article submission: {} - {}'.format(e.__class__.__name__, str(e)))
print(traceback.format_exc())
return {'error': str(e)}, 400