Skip to content

Commit

Permalink
Use #success? instead of 200 check
Browse files Browse the repository at this point in the history
  • Loading branch information
capripot committed Feb 9, 2021
1 parent c5041d4 commit fff61e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/greenhouse_io/api/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit fff61e4

Please sign in to comment.