From ceb11db937d7d8761357c13d14720c39bd43656d Mon Sep 17 00:00:00 2001 From: Dylan Date: Wed, 19 Jul 2023 00:57:10 +0100 Subject: [PATCH] More descriptive 500 Errors for API --- twitfix.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/twitfix.py b/twitfix.py index a605cee..2cebf23 100644 --- a/twitfix.py +++ b/twitfix.py @@ -176,11 +176,11 @@ def twitfix(sub_path): pass if tweet is None: - abort(500) + abort(500, '{"message": "Failed to extract tweet (Twitter API error)"}') return apiObject except Exception as e: log.error(e) - abort(500) + abort(500, '{"message": "Failed to extract tweet (Processing error)"}') if match is not None: twitter_url = sub_path