diff --git a/libraries/organization_api.rb b/libraries/organization_api.rb index 0a3d0eae..1a2cb42f 100644 --- a/libraries/organization_api.rb +++ b/libraries/organization_api.rb @@ -199,7 +199,11 @@ def _do_request(grafana_options, payload=nil) success: grafana_options[:success_msg], unknown_code: grafana_options[:unknown_code_msg] ) - JSON.parse(response.body) + begin + JSON.parse(response.body) + rescue JSON::ParserError + nil + end rescue BackendError nil end