sensu-plugins / sensu-plugins-http

This plugin provides native HTTP instrumentation for monitoring and metrics collection, including: response code, JSON response, HTTP last modified, SSL expiry, and metrics via `curl`.
http://sensu-plugins.io
MIT License
30 stars 97 forks source link

Handle empty body #153

Closed anne23 closed 4 years ago

anne23 commented 4 years ago

to avoid no implicit conversion of nil into String errors when using -w

Pull Request Checklist

There's no open issue that I can find for this, but it's fixing something that has confused people quite often in our check output.

General

Purpose

to avoid no implicit conversion of nil into String errors when using -w and getting an empty body in the response, because this generally isn't a very helpful indication of what the actual problem is when a check starts failing and can get in the way of people investigating the real issue

Known Compatibility Issues

jspaleta commented 4 years ago

LGTM, merging fix should show up in next release