hawkular / hawkular-client-ruby

Ruby client for Hawkular
http://hawkular.org/
Apache License 2.0
8 stars 28 forks source link

Return nil in "resource" method if requested resource doesn't exist #255

Closed israel-hdez closed 6 years ago

israel-hdez commented 6 years ago

Method resource of inventory API is returning the generic Hawkular::Exception if any error occurs. However, the special case of querying non existent resources should be easily identifiable.

To accomplish this, a a nil value is returned if Hawkular replies with 404 status.

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.04%) to 96.882% when pulling 52f7482ed4df3b68966d4f37478ab81276f53cb4 on israel-hdez:resource-not-found-ex into f149df16193fe4d6114dc1cb6340d71b42633cb1 on hawkular:master.

josejulio commented 6 years ago

LGTM