More descriptive 500 Errors for API
This commit is contained in:
parent
8f8a5e27f5
commit
ceb11db937
@ -176,11 +176,11 @@ def twitfix(sub_path):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
if tweet is None:
|
if tweet is None:
|
||||||
abort(500)
|
abort(500, '{"message": "Failed to extract tweet (Twitter API error)"}')
|
||||||
return apiObject
|
return apiObject
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
log.error(e)
|
log.error(e)
|
||||||
abort(500)
|
abort(500, '{"message": "Failed to extract tweet (Processing error)"}')
|
||||||
|
|
||||||
if match is not None:
|
if match is not None:
|
||||||
twitter_url = sub_path
|
twitter_url = sub_path
|
||||||
|
Loading…
x
Reference in New Issue
Block a user