Sha256: 61d87c163343d7b156dc5b94857ab85e5d737dbf8454774f2e2cb0dec2f539c8
Contents?: true
Size: 736 Bytes
Versions: 6
Compression:
Stored size: 736 Bytes
Contents
module LaunchDarkly module Util def self.log_exception(logger, message, exc) logger.error { "[LDClient] #{message}: #{exc.inspect}" } logger.debug { "[LDClient] Exception trace: #{exc.backtrace}" } end def self.http_error_recoverable?(status) if status >= 400 && status < 500 status == 400 || status == 408 || status == 429 else true end end def self.http_error_message(status, context, recoverable_message) desc = (status == 401 || status == 403) ? " (invalid SDK key)" : "" message = Util.http_error_recoverable?(status) ? recoverable_message : "giving up permanently" "HTTP error #{status}#{desc} for #{context} - #{message}" end end end
Version data entries
6 entries across 6 versions & 1 rubygems