diff --git a/lib/greenhouse_io/api/client.rb b/lib/greenhouse_io/api/client.rb index 453d52d..e70d790 100644 --- a/lib/greenhouse_io/api/client.rb +++ b/lib/greenhouse_io/api/client.rb @@ -118,7 +118,7 @@ def post_to_harvest_api(url, body, headers) set_headers_info(response.headers) - if response.code == 200 + if response.success? parse_json(response) else raise GreenhouseIo::Error.new(response.code)