File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,8 @@ exports.handler = async function http(req) {
104
104
if ( ! checkIfContainsVideoOrGif ( data ) ) {
105
105
if ( data . quoted_status_id ) {
106
106
// If it is a quoted tweet, we find the data for the tweet quoted
107
- data = data . quoted_status ;
107
+ if ( ! data . quoted_status ) throw new Error ( 610 ) ;
108
+ else data = data . quoted_status ;
108
109
// Check for the video in the quoted tweet. If we still can't find video, we throw error
109
110
if ( ! checkIfContainsVideoOrGif ( data ) ) throw new Error ( 605 ) ;
110
111
} else throw new Error ( 605 ) ;
@@ -146,6 +147,7 @@ exports.handler = async function http(req) {
146
147
606 : "Shortcut compromised." ,
147
148
607 : "Outdated shortcut version." ,
148
149
608 : "Cannot resolve URL redirect" ,
150
+ 610 : "Quoted tweet not found." ,
149
151
} ;
150
152
151
153
let error ;
You can’t perform that action at this time.
0 commit comments