Skip to content

Commit

Permalink
fix: expose the response code on the error message (#232)
Browse files Browse the repository at this point in the history
  • Loading branch information
tonicospinelli authored Feb 4, 2025
1 parent 03e988d commit f5f0e43
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/unleash/toggle_fetcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ def fetch
Unleash.logger.debug "No changes according to the unleash server, nothing to do."
return
elsif response.code != '200'
raise IOError, "Unleash server returned a non 200/304 HTTP result."
raise IOError, "Unleash server returned unexpected HTTP response code #{response.code}."\
" Only handle response codes 200 (indicates changes) or 304 (no changes)."
end

self.etag = response['ETag']
Expand Down

0 comments on commit f5f0e43

Please sign in to comment.