diff options
author | pdp8 <pdp8@pdp8.info> | 2023-12-20 11:20:50 +0100 |
---|---|---|
committer | pdp8 <pdp8@pdp8.info> | 2023-12-20 11:20:50 +0100 |
commit | 88518c5a4fa4fa9d841bb0d1c8add9fa2234530c (patch) | |
tree | 8a808ff352841779637c6bd1aa171e94c2c55cdf /helpers.rb | |
parent | 443b6fd42abf9cb1392125199cca449702898327 (diff) |
follow, announce, delete fixed
Diffstat (limited to 'helpers.rb')
-rw-r--r-- | helpers.rb | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -136,7 +136,14 @@ helpers do response = curl( "-H 'Accept: #{accept}' -H 'Host: #{uri.host}' -H 'Date: #{httpdate}' -H 'Signature: #{signed_header}' ", url ) - response ? JSON.parse(response) : nil + return unless response + + begin + JSON.parse(response) + rescue StandardError => e + p url, e + nil + end end def curl(ext, url) @@ -144,7 +151,7 @@ helpers do if $CHILD_STATUS.success? response else - p 'curl error:', url, response + p 'Curl Error:', url, response nil end end |