Skip to content

Commit 910610d

Browse files
committed
test fetch_with_meta error handling
1 parent 8faa80d commit 910610d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
set res = sqlpage.fetch_with_meta('http://not-a-real-url');
2+
3+
select 'text' as component,
4+
case
5+
when json_extract($res, '$.error') LIKE 'Request failed%' then 'It works !'
6+
else 'Error! Got: ' || $res
7+
end as contents;

0 commit comments

Comments
 (0)