Handle unauthorized case in backend

This commit is contained in:
Brahim Hadriche committed 2025-05-06 17:05:01 -04:00
1 parent 1120d40085
commit 21a10705f1
1 file changed
+27
@@ -80,6 +80,15 @@ namespace Http
return true
end if
if IsAssociativeArray(feeds)
if feeds.error <> invalid
response.Json(feeds)
response.http_code = 500
return true
end if
return true
end if
result = {
"videos": []
}
@@ -144,6 +153,15 @@ namespace Http
return true
end if
if IsAssociativeArray(feeds)
if feeds.error <> invalid
response.Json(feeds)
response.http_code = 500
return true
end if
return true
end if
if feeds.Count() > 0
response.Json(feeds[0])
return true
@@ -186,6 +204,15 @@ namespace Http
return true
end if
if IsAssociativeArray(feeds)
if feeds.error <> invalid
response.Json(feeds)
response.http_code = 500
return true
end if
return true
end if
if feeds.Count() > 0
response.Json(feeds[0])
return true