Skip to content
Snippets Groups Projects
Commit be4c08d5 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

Fix #1609

parent dffd5c71
No related branches found
No related tags found
No related merge requests found
......@@ -31,7 +31,11 @@ class Screenshot
'x-api-key' => ENV['MICROLINK_API_KEY']
}
})
data = JSON.parse(response.body)
data.dig('data', 'screenshot', 'url')
begin
data = JSON.parse(response.body)
data.dig('data', 'screenshot', 'url')
rescue
# In case of service unavailable, we get here because it's not json
end
end
end
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment