More descriptive 500 Errors for API
This commit is contained in:
parent
8f8a5e27f5
commit
ceb11db937
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user